/// <summary> /// Renders the item stack for being in an entity's hand Args: itemStack /// </summary> public virtual void RenderItem(EntityLiving par1EntityLiving, ItemStack par2ItemStack, int par3) { //GL.PushMatrix(); if (par2ItemStack.ItemID < 256 && RenderBlocks.RenderItemIn3d(Block.BlocksList[par2ItemStack.ItemID].GetRenderType())) { //GL.BindTexture(TextureTarget.Texture2D, Mc.RenderEngineOld.GetTexture("/terrain.png")); RenderBlocksInstance.RenderBlockAsItem(Block.BlocksList[par2ItemStack.ItemID], par2ItemStack.GetItemDamage(), 1.0F); } else { if (par2ItemStack.ItemID < 256) { //GL.BindTexture(TextureTarget.Texture2D, Mc.RenderEngineOld.GetTexture("/terrain.png")); } else { //GL.BindTexture(TextureTarget.Texture2D, Mc.RenderEngineOld.GetTexture("/gui/items.png")); } Tessellator tessellator = Tessellator.Instance; int i = par1EntityLiving.GetItemIcon(par2ItemStack, par3); float f = ((float)((i % 16) * 16) + 0.0F) / 256F; float f1 = ((float)((i % 16) * 16) + 15.99F) / 256F; float f2 = ((float)((i / 16) * 16) + 0.0F) / 256F; float f3 = ((float)((i / 16) * 16) + 15.99F) / 256F; // float f4 = 0.0F; // float f5 = 0.3F; //GL.Enable(EnableCap.RescaleNormal); //GL.Translate(-f4, -f5, 0.0F); // float f6 = 1.5F; //GL.Scale(f6, f6, f6); //GL.Rotate(50F, 0.0F, 1.0F, 0.0F); //GL.Rotate(335F, 0.0F, 0.0F, 1.0F); //GL.Translate(-0.9375F, -0.0625F, 0.0F); RenderItemIn2D(tessellator, f1, f2, f, f3); if (par2ItemStack != null && par2ItemStack.HasEffect() && par3 == 0) { //GL.DepthFunc(DepthFunction.Equal); //GL.Disable(EnableCap.Lighting); Mc.RenderEngineOld.BindTexture(Mc.RenderEngineOld.GetTexture("%blur%/misc/glint.png")); //GL.Enable(EnableCap.Blend); //GL.BlendFunc(BlendingFactorSrc.One, BlendingFactorDest.One); // float f7 = 0.76F; //GL.Color4(0.5F * f7, 0.25F * f7, 0.8F * f7, 1.0F); //GL.MatrixMode(MatrixMode.Texture); //GL.PushMatrix(); // float f8 = 0.125F; //GL.Scale(f8, f8, f8); float f9 = ((float)(JavaHelper.CurrentTimeMillis() % 3000L) / 3000F) * 8F; //GL.Translate(f9, 0.0F, 0.0F); //GL.Rotate(-50F, 0.0F, 0.0F, 1.0F); RenderItemIn2D(tessellator, 0.0F, 0.0F, 1.0F, 1.0F); //GL.PopMatrix(); //GL.PushMatrix(); //GL.Scale(f8, f8, f8); f9 = ((float)(JavaHelper.CurrentTimeMillis() % 4873L) / 4873F) * 8F; //GL.Translate(-f9, 0.0F, 0.0F); //GL.Rotate(10F, 0.0F, 0.0F, 1.0F); RenderItemIn2D(tessellator, 0.0F, 0.0F, 1.0F, 1.0F); //GL.PopMatrix(); //GL.MatrixMode(MatrixMode.Modelview); //GL.Disable(EnableCap.Blend); //GL.Enable(EnableCap.Lighting); //GL.DepthFunc(DepthFunction.Lequal); } //GL.Disable(EnableCap.RescaleNormal); } //GL.PopMatrix(); }