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-06-07 21:36:52 +00:00
|
|
|
import biomesoplenty.blocks.renderers.AltarRenderer;
|
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-06-15 08:46:50 +00:00
|
|
|
import biomesoplenty.entities.EntityGlob;
|
2013-07-02 11:05:59 +00:00
|
|
|
import biomesoplenty.entities.EntityJungleSpider;
|
|
|
|
import biomesoplenty.entities.EntityRosester;
|
2013-07-03 07:51:39 +00:00
|
|
|
import biomesoplenty.entities.projectiles.EntityDart;
|
|
|
|
import biomesoplenty.entities.projectiles.EntityMudball;
|
|
|
|
import biomesoplenty.entities.render.RenderDart;
|
2013-07-02 11:05:59 +00:00
|
|
|
import biomesoplenty.entities.render.RenderGlob;
|
|
|
|
import biomesoplenty.entities.render.RenderJungleSpider;
|
|
|
|
import biomesoplenty.entities.render.RenderRosester;
|
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-06-08 07:04:09 +00:00
|
|
|
RenderUtils.altarModel = RenderingRegistry.getNextAvailableRenderId();
|
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-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());
|
|
|
|
|
|
|
|
RenderingRegistry.registerEntityRenderingHandler(EntityGlob.class, new RenderGlob(new ModelSlime(16), new ModelSlime(0), 0.25F));
|
2013-07-02 11:05:59 +00:00
|
|
|
RenderingRegistry.registerEntityRenderingHandler(EntityJungleSpider.class, new RenderJungleSpider());
|
|
|
|
RenderingRegistry.registerEntityRenderingHandler(EntityRosester.class, new RenderRosester(new ModelChicken(), 0.3F));
|
2013-05-31 10:34:02 +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-07 21:36:52 +00:00
|
|
|
RenderingRegistry.registerBlockHandler(new AltarRenderer());
|
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-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);
|
|
|
|
}
|
|
|
|
}
|