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 RenderEnderCrystal extends Render
009    {
010        private int field_76996_a = -1;
011        private ModelBase field_76995_b;
012    
013        public RenderEnderCrystal()
014        {
015            this.shadowSize = 0.5F;
016        }
017    
018        public void func_76994_a(EntityEnderCrystal par1EntityEnderCrystal, double par2, double par4, double par6, float par8, float par9)
019        {
020            if (this.field_76996_a != 1)
021            {
022                this.field_76995_b = new ModelEnderCrystal(0.0F);
023                this.field_76996_a = 1;
024            }
025    
026            float var10 = (float)par1EntityEnderCrystal.innerRotation + par9;
027            GL11.glPushMatrix();
028            GL11.glTranslatef((float)par2, (float)par4, (float)par6);
029            this.loadTexture("/mob/enderdragon/crystal.png");
030            float var11 = MathHelper.sin(var10 * 0.2F) / 2.0F + 0.5F;
031            var11 += var11 * var11;
032            this.field_76995_b.render(par1EntityEnderCrystal, 0.0F, var10 * 3.0F, var11 * 0.2F, 0.0F, 0.0F, 0.0625F);
033            GL11.glPopMatrix();
034        }
035    
036        /**
037         * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then
038         * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic
039         * (Render<T extends Entity) and this method has signature public void doRender(T entity, double d, double d1,
040         * double d2, float f, float f1). But JAD is pre 1.5 so doesn't do that.
041         */
042        public void doRender(Entity par1Entity, double par2, double par4, double par6, float par8, float par9)
043        {
044            this.func_76994_a((EntityEnderCrystal)par1Entity, par2, par4, par6, par8, par9);
045        }
046    }