    001    package net.minecraft.client.renderer.tileentity;
    002
    003    import cpw.mods.fml.relauncher.Side;
    004    import cpw.mods.fml.relauncher.SideOnly;
    005    import net.minecraft.client.model.ModelBase;
    006    import net.minecraft.client.model.ModelEnderCrystal;
    007    import net.minecraft.client.renderer.entity.Render;
    008    import net.minecraft.entity.Entity;
    009    import net.minecraft.entity.item.EntityEnderCrystal;
    010    import net.minecraft.util.MathHelper;
    011    import org.lwjgl.opengl.GL11;
    012
    013    @SideOnly(Side.CLIENT)
    014    public class RenderEnderCrystal extends Render
    015    {
    016        private int field_76996_a = -1;
    017        private ModelBase field_76995_b;
    018
    019        public RenderEnderCrystal()
    020        {
    021            this.shadowSize = 0.5F;
    022        }
    023
    024        /**
    025         * Renders the Ender Crystal.
    026         */
    027        public void doRenderEnderCrystal(EntityEnderCrystal par1EntityEnderCrystal, double par2, double par4, double par6, float par8, float par9)
    028        {
    029            if (this.field_76996_a != 1)
    030            {
    031                this.field_76995_b = new ModelEnderCrystal(0.0F, true);
    032                this.field_76996_a = 1;
    033            }
    034
    035            float var10 = (float)par1EntityEnderCrystal.innerRotation + par9;
    036            GL11.glPushMatrix();
    037            GL11.glTranslatef((float)par2, (float)par4, (float)par6);
    038            this.loadTexture("/mob/enderdragon/crystal.png");
    039            float var11 = MathHelper.sin(var10 * 0.2F) / 2.0F + 0.5F;
    040            var11 += var11 * var11;
    041            this.field_76995_b.render(par1EntityEnderCrystal, 0.0F, var10 * 3.0F, var11 * 0.2F, 0.0F, 0.0F, 0.0625F);
    042            GL11.glPopMatrix();
    043        }
    044
    045        /**
    046         * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then
    047         * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic
    048         * (Render<T extends Entity) and this method has signature public void doRender(T entity, double d, double d1,
    049         * double d2, float f, float f1). But JAD is pre 1.5 so doesn't do that.
    050         */
    051        public void doRender(Entity par1Entity, double par2, double par4, double par6, float par8, float par9)
    052        {
    053            this.doRenderEnderCrystal((EntityEnderCrystal)par1Entity, par2, par4, par6, par8, par9);
    054        }
    055    }