001 package net.minecraft.src; 002 003 import cpw.mods.fml.common.Side; 004 import cpw.mods.fml.common.asm.SideOnly; 005 import org.lwjgl.opengl.GL11; 006 007 @SideOnly(Side.CLIENT) 008 public class RenderSquid extends RenderLiving 009 { 010 public RenderSquid(ModelBase par1ModelBase, float par2) 011 { 012 super(par1ModelBase, par2); 013 } 014 015 /** 016 * Renders the Living Squid. 017 */ 018 public void renderLivingSquid(EntitySquid par1EntitySquid, double par2, double par4, double par6, float par8, float par9) 019 { 020 super.doRenderLiving(par1EntitySquid, par2, par4, par6, par8, par9); 021 } 022 023 /** 024 * Rotates the Squid's corpse. 025 */ 026 protected void rotateSquidsCorpse(EntitySquid par1EntitySquid, float par2, float par3, float par4) 027 { 028 float var5 = par1EntitySquid.field_70862_e + (par1EntitySquid.field_70861_d - par1EntitySquid.field_70862_e) * par4; 029 float var6 = par1EntitySquid.field_70860_g + (par1EntitySquid.field_70859_f - par1EntitySquid.field_70860_g) * par4; 030 GL11.glTranslatef(0.0F, 0.5F, 0.0F); 031 GL11.glRotatef(180.0F - par3, 0.0F, 1.0F, 0.0F); 032 GL11.glRotatef(var5, 1.0F, 0.0F, 0.0F); 033 GL11.glRotatef(var6, 0.0F, 1.0F, 0.0F); 034 GL11.glTranslatef(0.0F, -1.2F, 0.0F); 035 } 036 037 protected float handleRotationFloat(EntitySquid par1EntitySquid, float par2) 038 { 039 return par1EntitySquid.lastTentacleAngle + (par1EntitySquid.tentacleAngle - par1EntitySquid.lastTentacleAngle) * par2; 040 } 041 042 /** 043 * Defines what float the third param in setRotationAngles of ModelBase is 044 */ 045 protected float handleRotationFloat(EntityLiving par1EntityLiving, float par2) 046 { 047 return this.handleRotationFloat((EntitySquid)par1EntityLiving, par2); 048 } 049 050 protected void rotateCorpse(EntityLiving par1EntityLiving, float par2, float par3, float par4) 051 { 052 this.rotateSquidsCorpse((EntitySquid)par1EntityLiving, par2, par3, par4); 053 } 054 055 public void doRenderLiving(EntityLiving par1EntityLiving, double par2, double par4, double par6, float par8, float par9) 056 { 057 this.renderLivingSquid((EntitySquid)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.renderLivingSquid((EntitySquid)par1Entity, par2, par4, par6, par8, par9); 069 } 070 }