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 public void func_77123_a(EntitySquid par1EntitySquid, double par2, double par4, double par6, float par8, float par9) 016 { 017 super.doRenderLiving(par1EntitySquid, par2, par4, par6, par8, par9); 018 } 019 020 protected void func_77122_a(EntitySquid par1EntitySquid, float par2, float par3, float par4) 021 { 022 float var5 = par1EntitySquid.field_70862_e + (par1EntitySquid.field_70861_d - par1EntitySquid.field_70862_e) * par4; 023 float var6 = par1EntitySquid.field_70860_g + (par1EntitySquid.field_70859_f - par1EntitySquid.field_70860_g) * par4; 024 GL11.glTranslatef(0.0F, 0.5F, 0.0F); 025 GL11.glRotatef(180.0F - par3, 0.0F, 1.0F, 0.0F); 026 GL11.glRotatef(var5, 1.0F, 0.0F, 0.0F); 027 GL11.glRotatef(var6, 0.0F, 1.0F, 0.0F); 028 GL11.glTranslatef(0.0F, -1.2F, 0.0F); 029 } 030 031 protected float handleRotationFloat(EntitySquid par1EntitySquid, float par2) 032 { 033 return par1EntitySquid.lastTentacleAngle + (par1EntitySquid.tentacleAngle - par1EntitySquid.lastTentacleAngle) * par2; 034 } 035 036 /** 037 * Defines what float the third param in setRotationAngles of ModelBase is 038 */ 039 protected float handleRotationFloat(EntityLiving par1EntityLiving, float par2) 040 { 041 return this.handleRotationFloat((EntitySquid)par1EntityLiving, par2); 042 } 043 044 protected void rotateCorpse(EntityLiving par1EntityLiving, float par2, float par3, float par4) 045 { 046 this.func_77122_a((EntitySquid)par1EntityLiving, par2, par3, par4); 047 } 048 049 public void doRenderLiving(EntityLiving par1EntityLiving, double par2, double par4, double par6, float par8, float par9) 050 { 051 this.func_77123_a((EntitySquid)par1EntityLiving, par2, par4, par6, par8, par9); 052 } 053 054 /** 055 * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then 056 * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic 057 * (Render<T extends Entity) and this method has signature public void doRender(T entity, double d, double d1, 058 * double d2, float f, float f1). But JAD is pre 1.5 so doesn't do that. 059 */ 060 public void doRender(Entity par1Entity, double par2, double par4, double par6, float par8, float par9) 061 { 062 this.func_77123_a((EntitySquid)par1Entity, par2, par4, par6, par8, par9); 063 } 064 }