001 package net.minecraft.client.renderer.entity;
002
003 import cpw.mods.fml.relauncher.Side;
004 import cpw.mods.fml.relauncher.SideOnly;
005 import net.minecraft.client.model.ModelSilverfish;
006 import net.minecraft.entity.Entity;
007 import net.minecraft.entity.EntityLiving;
008 import net.minecraft.entity.monster.EntitySilverfish;
009
010 @SideOnly(Side.CLIENT)
011 public class RenderSilverfish extends RenderLiving
012 {
013 public RenderSilverfish()
014 {
015 super(new ModelSilverfish(), 0.3F);
016 }
017
018 /**
019 * Return the silverfish's maximum death rotation.
020 */
021 protected float getSilverfishDeathRotation(EntitySilverfish par1EntitySilverfish)
022 {
023 return 180.0F;
024 }
025
026 /**
027 * Renders the silverfish.
028 */
029 public void renderSilverfish(EntitySilverfish par1EntitySilverfish, double par2, double par4, double par6, float par8, float par9)
030 {
031 super.doRenderLiving(par1EntitySilverfish, par2, par4, par6, par8, par9);
032 }
033
034 /**
035 * Disallows the silverfish to render the renderPassModel.
036 */
037 protected int shouldSilverfishRenderPass(EntitySilverfish par1EntitySilverfish, int par2, float par3)
038 {
039 return -1;
040 }
041
042 protected float getDeathMaxRotation(EntityLiving par1EntityLiving)
043 {
044 return this.getSilverfishDeathRotation((EntitySilverfish)par1EntityLiving);
045 }
046
047 /**
048 * Queries whether should render the specified pass or not.
049 */
050 protected int shouldRenderPass(EntityLiving par1EntityLiving, int par2, float par3)
051 {
052 return this.shouldSilverfishRenderPass((EntitySilverfish)par1EntityLiving, par2, par3);
053 }
054
055 public void doRenderLiving(EntityLiving par1EntityLiving, double par2, double par4, double par6, float par8, float par9)
056 {
057 this.renderSilverfish((EntitySilverfish)par1EntityLiving, par2, par4, par6, par8, par9);
058 }
059
060 /**
061 * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then
062 * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic
063 * (Render<T extends Entity) and this method has signature public void doRender(T entity, double d, double d1,
064 * double d2, float f, float f1). But JAD is pre 1.5 so doesn't do that.
065 */
066 public void doRender(Entity par1Entity, double par2, double par4, double par6, float par8, float par9)
067 {
068 this.renderSilverfish((EntitySilverfish)par1Entity, par2, par4, par6, par8, par9);
069 }
070 }