/// <summary> /// Render the block an enderman is carrying /// </summary> protected virtual void RenderCarrying(EntityEnderman par1EntityEnderman, float par2) { base.RenderEquippedItems(par1EntityEnderman, par2); if (par1EntityEnderman.GetCarried() > 0) { //GL.Enable(EnableCap.RescaleNormal); //GL.PushMatrix(); float f = 0.5F; //GL.Translate(0.0F, 0.6875F, -0.75F); f *= 1.0F; //GL.Rotate(20F, 1.0F, 0.0F, 0.0F); //GL.Rotate(45F, 0.0F, 1.0F, 0.0F); //GL.Scale(f, -f, f); int i = par1EntityEnderman.GetBrightnessForRender(par2); int j = i % 0x10000; int k = i / 0x10000; OpenGlHelper.SetLightmapTextureCoords(OpenGlHelper.LightmapTexUnit, (float)j / 1.0F, (float)k / 1.0F); //GL.Color4(1.0F, 1.0F, 1.0F, 1.0F); //GL.Color4(1.0F, 1.0F, 1.0F, 1.0F); LoadTexture("/terrain.png"); RenderBlocks.RenderBlockAsItem(Block.BlocksList[par1EntityEnderman.GetCarried()], par1EntityEnderman.GetCarryingData(), 1.0F); //GL.PopMatrix(); //GL.Disable(EnableCap.RescaleNormal); } }
/// <summary> /// Renders the enderman /// </summary> public virtual void DoRenderEnderman(EntityEnderman par1EntityEnderman, double par2, double par4, double par6, float par8, float par9) { EndermanModel.IsCarrying = par1EntityEnderman.GetCarried() > 0; EndermanModel.IsAttacking = par1EntityEnderman.IsAttacking; if (par1EntityEnderman.IsAttacking) { double d = 0.02D; par2 += Rnd.NextGaussian() * d; par6 += Rnd.NextGaussian() * d; } base.DoRenderLiving(par1EntityEnderman, par2, par4, par6, par8, par9); }
/// <summary> /// Render the endermans eyes /// </summary> protected virtual int RenderEyes(EntityEnderman par1EntityEnderman, int par2, float par3) { if (par2 != 0) { return(-1); } else { LoadTexture("/mob/enderman_eyes.png"); float f = 1.0F; //GL.Enable(EnableCap.Blend); //GL.Disable(EnableCap.AlphaTest); //GL.BlendFunc(BlendingFactorSrc.One, BlendingFactorDest.One); //GL.Disable(EnableCap.Lighting); int i = 61680; int j = i % 0x10000; int k = i / 0x10000; OpenGlHelper.SetLightmapTextureCoords(OpenGlHelper.LightmapTexUnit, (float)j / 1.0F, (float)k / 1.0F); //GL.Color4(1.0F, 1.0F, 1.0F, 1.0F); //GL.Enable(EnableCap.Lighting); //GL.Color4(1.0F, 1.0F, 1.0F, f); return(1); } }