2013-05-03 13:00:44 +00:00
|
|
|
package biomesoplenty;
|
|
|
|
|
|
|
|
import net.minecraft.client.Minecraft;
|
2013-07-02 11:05:59 +00:00
|
|
|
import net.minecraft.client.model.ModelChicken;
|
2013-05-17 07:18:08 +00:00
|
|
|
import net.minecraft.client.model.ModelSlime;
|
2013-05-03 13:00:44 +00:00
|
|
|
import net.minecraft.client.particle.EntityBreakingFX;
|
|
|
|
import net.minecraft.client.particle.EntityFX;
|
|
|
|
import net.minecraft.client.renderer.entity.RenderSnowball;
|
|
|
|
import biomesoplenty.api.Items;
|
2013-09-24 07:53:43 +00:00
|
|
|
import biomesoplenty.blocks.renderers.BambooRenderer;
|
2013-05-03 13:00:44 +00:00
|
|
|
import biomesoplenty.blocks.renderers.FoliageRenderer;
|
2013-07-09 21:05:03 +00:00
|
|
|
import biomesoplenty.blocks.renderers.GraveRenderer;
|
2013-05-03 13:00:44 +00:00
|
|
|
import biomesoplenty.blocks.renderers.PlantsRenderer;
|
2013-06-25 08:53:40 +00:00
|
|
|
import biomesoplenty.blocks.renderers.PuddleRender;
|
2013-06-08 07:04:09 +00:00
|
|
|
import biomesoplenty.blocks.renderers.RenderUtils;
|
2013-05-22 20:08:28 +00:00
|
|
|
import biomesoplenty.blocks.renderers.SmallBlockRenderer;
|
2013-10-11 14:28:13 +00:00
|
|
|
import biomesoplenty.configuration.configfile.BOPConfigurationIDs;
|
2013-11-08 03:16:32 +00:00
|
|
|
import biomesoplenty.entities.EntityBird;
|
2013-06-15 08:46:50 +00:00
|
|
|
import biomesoplenty.entities.EntityGlob;
|
2013-07-02 11:05:59 +00:00
|
|
|
import biomesoplenty.entities.EntityJungleSpider;
|
2013-08-30 11:38:54 +00:00
|
|
|
import biomesoplenty.entities.EntityPhantom;
|
2013-07-02 11:05:59 +00:00
|
|
|
import biomesoplenty.entities.EntityRosester;
|
2013-10-27 06:20:58 +00:00
|
|
|
import biomesoplenty.entities.EntityWasp;
|
2013-07-03 07:51:39 +00:00
|
|
|
import biomesoplenty.entities.projectiles.EntityDart;
|
|
|
|
import biomesoplenty.entities.projectiles.EntityMudball;
|
2013-11-08 03:16:32 +00:00
|
|
|
import biomesoplenty.entities.render.RenderBird;
|
2013-07-03 07:51:39 +00:00
|
|
|
import biomesoplenty.entities.render.RenderDart;
|
2013-07-02 11:05:59 +00:00
|
|
|
import biomesoplenty.entities.render.RenderGlob;
|
|
|
|
import biomesoplenty.entities.render.RenderJungleSpider;
|
2013-08-30 11:38:54 +00:00
|
|
|
import biomesoplenty.entities.render.RenderPhantom;
|
2013-07-02 11:05:59 +00:00
|
|
|
import biomesoplenty.entities.render.RenderRosester;
|
2013-10-27 06:20:58 +00:00
|
|
|
import biomesoplenty.entities.render.RenderWasp;
|
2013-05-13 07:49:06 +00:00
|
|
|
import biomesoplenty.particles.EntityDandelionFX;
|
2013-05-30 08:18:07 +00:00
|
|
|
import biomesoplenty.particles.EntitySteamFX;
|
2013-05-03 13:00:44 +00:00
|
|
|
import cpw.mods.fml.client.registry.RenderingRegistry;
|
|
|
|
|
|
|
|
public class ClientProxy extends CommonProxy {
|
2013-05-31 10:34:02 +00:00
|
|
|
|
|
|
|
public static Minecraft mc = Minecraft.getMinecraft();
|
2013-06-30 09:14:10 +00:00
|
|
|
public static int puddleRenderPass;
|
2013-05-03 13:00:44 +00:00
|
|
|
|
|
|
|
@Override
|
2013-05-31 10:34:02 +00:00
|
|
|
public void registerRenderers()
|
2013-05-03 13:00:44 +00:00
|
|
|
{
|
2013-07-09 21:05:03 +00:00
|
|
|
RenderUtils.foliageModel = RenderingRegistry.getNextAvailableRenderId();
|
|
|
|
RenderUtils.plantsModel = RenderingRegistry.getNextAvailableRenderId();
|
|
|
|
RenderUtils.puddleModel = RenderingRegistry.getNextAvailableRenderId();
|
|
|
|
RenderUtils.bonesModel = RenderingRegistry.getNextAvailableRenderId();
|
|
|
|
RenderUtils.graveModel = RenderingRegistry.getNextAvailableRenderId();
|
2013-09-24 07:53:43 +00:00
|
|
|
RenderUtils.bambooModel = RenderingRegistry.getNextAvailableRenderId();
|
2013-06-08 07:04:09 +00:00
|
|
|
|
2013-05-31 10:34:02 +00:00
|
|
|
RenderingRegistry.registerEntityRenderingHandler(EntityMudball.class, new RenderSnowball(Items.mudball.get(), 0));
|
|
|
|
RenderingRegistry.registerEntityRenderingHandler(EntityDart.class, new RenderDart());
|
|
|
|
|
2013-10-11 14:28:13 +00:00
|
|
|
if (BOPConfigurationIDs.globID > 0)
|
|
|
|
{
|
|
|
|
RenderingRegistry.registerEntityRenderingHandler(EntityGlob.class, new RenderGlob(new ModelSlime(16), new ModelSlime(0), 0.25F));
|
|
|
|
}
|
|
|
|
|
|
|
|
if (BOPConfigurationIDs.jungleSpiderID > 0)
|
|
|
|
{
|
|
|
|
RenderingRegistry.registerEntityRenderingHandler(EntityJungleSpider.class, new RenderJungleSpider());
|
|
|
|
}
|
|
|
|
|
|
|
|
if (BOPConfigurationIDs.rosesterID > 0)
|
|
|
|
{
|
|
|
|
RenderingRegistry.registerEntityRenderingHandler(EntityRosester.class, new RenderRosester(new ModelChicken(), 0.3F));
|
|
|
|
}
|
|
|
|
|
|
|
|
if (BOPConfigurationIDs.phantomID > 0)
|
|
|
|
{
|
|
|
|
RenderingRegistry.registerEntityRenderingHandler(EntityPhantom.class, new RenderPhantom());
|
|
|
|
}
|
2013-05-31 10:34:02 +00:00
|
|
|
|
2013-10-27 06:20:58 +00:00
|
|
|
if (BOPConfigurationIDs.waspID > 0)
|
|
|
|
{
|
|
|
|
RenderingRegistry.registerEntityRenderingHandler(EntityWasp.class, new RenderWasp());
|
|
|
|
}
|
2013-11-08 03:16:32 +00:00
|
|
|
|
|
|
|
if (BOPConfigurationIDs.birdID > 0)
|
|
|
|
{
|
|
|
|
RenderingRegistry.registerEntityRenderingHandler(EntityBird.class, new RenderBird());
|
|
|
|
}
|
2013-10-27 06:20:58 +00:00
|
|
|
|
2013-05-03 13:00:44 +00:00
|
|
|
RenderingRegistry.registerBlockHandler(new FoliageRenderer());
|
|
|
|
RenderingRegistry.registerBlockHandler(new PlantsRenderer());
|
2013-05-22 20:08:28 +00:00
|
|
|
RenderingRegistry.registerBlockHandler(new SmallBlockRenderer());
|
2013-06-25 08:53:40 +00:00
|
|
|
RenderingRegistry.registerBlockHandler(new PuddleRender());
|
2013-07-09 21:05:03 +00:00
|
|
|
RenderingRegistry.registerBlockHandler(new GraveRenderer());
|
2013-09-24 07:53:43 +00:00
|
|
|
RenderingRegistry.registerBlockHandler(new BambooRenderer());
|
2013-05-03 13:00:44 +00:00
|
|
|
}
|
2013-05-31 10:34:02 +00:00
|
|
|
|
2013-05-11 12:51:16 +00:00
|
|
|
@Override
|
2013-05-13 08:20:06 +00:00
|
|
|
public void spawnParticle(String string, double x, double y, double z)
|
2013-05-11 12:51:16 +00:00
|
|
|
{
|
2013-05-31 10:34:02 +00:00
|
|
|
EntityFX entityfx = null;
|
|
|
|
|
2013-07-02 11:05:59 +00:00
|
|
|
if (string == "mud")
|
|
|
|
{
|
2013-07-02 03:57:49 +00:00
|
|
|
entityfx = new EntityBreakingFX(mc.theWorld, x, y, z, Items.mudball.get());
|
2013-07-02 11:05:59 +00:00
|
|
|
}
|
|
|
|
else if (string == "dart")
|
|
|
|
{
|
2013-07-12 08:45:36 +00:00
|
|
|
entityfx = new EntityBreakingFX(mc.theWorld, x, y, z, Items.dart.get(), 0);
|
|
|
|
}
|
|
|
|
else if (string == "poisondart")
|
|
|
|
{
|
|
|
|
entityfx = new EntityBreakingFX(mc.theWorld, x, y, z, Items.dart.get(), 1);
|
2013-07-02 11:05:59 +00:00
|
|
|
}
|
|
|
|
else if (string == "dandelion")
|
|
|
|
{
|
2013-05-31 10:34:02 +00:00
|
|
|
entityfx = new EntityDandelionFX(mc.theWorld, x, y, z, 2.0F);
|
2013-07-02 11:05:59 +00:00
|
|
|
}
|
|
|
|
else if (string == "steam")
|
|
|
|
{
|
2013-05-31 10:34:02 +00:00
|
|
|
entityfx = new EntitySteamFX(mc.theWorld, x, y, z, 0.0D, 0.0D, 0.0D);
|
|
|
|
}
|
|
|
|
|
2013-05-30 08:18:07 +00:00
|
|
|
mc.effectRenderer.addEffect(entityfx);
|
2013-05-31 10:34:02 +00:00
|
|
|
}
|
2013-05-03 13:00:44 +00:00
|
|
|
|
|
|
|
@Override
|
|
|
|
public int addArmor(String armor)
|
|
|
|
{
|
|
|
|
return RenderingRegistry.addNewArmourRendererPrefix(armor);
|
|
|
|
}
|
|
|
|
}
|