/// <summary> /// Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then /// handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic /// (Render<T extends Entity) and this method has signature public void doRender(T entity, double d, double d1, /// double d2, float f, float f1). But JAD is pre 1.5 so doesn't do that. /// </summary> public override void DoRender(Entity par1Entity, double par2, double par4, double par6, float par8, float par9) { //GL.PushMatrix(); //GL.Translate((float)par2, (float)par4, (float)par6); //GL.Enable(EnableCap.RescaleNormal); //GL.Scale(0.5F, 0.5F, 0.5F); LoadTexture("/gui/items.png"); Tessellator tessellator = Tessellator.Instance; if (ItemIconIndex == 154) { int i = PotionHelper.Func_40358_a(((EntityPotion)par1Entity).GetPotionDamage(), false); float f = (float)(i >> 16 & 0xff) / 255F; float f1 = (float)(i >> 8 & 0xff) / 255F; float f2 = (float)(i & 0xff) / 255F; //GL.Color3(f, f1, f2); //GL.PushMatrix(); Func_40265_a(tessellator, 141); //GL.PopMatrix(); //GL.Color3(1.0F, 1.0F, 1.0F); } Func_40265_a(tessellator, ItemIconIndex); //GL.Disable(EnableCap.RescaleNormal); //GL.PopMatrix(); }
public override int GetColorFromDamage(int par1, int par2) { if (par2 > 0) { return(0xffffff); } else { return(PotionHelper.Func_40358_a(par1, false)); } }