    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 ModelEnderCrystal extends ModelBase
    009    {
    010        /** The cube model for the Ender Crystal. */
    011        private ModelRenderer cube;
    012
    013        /** The glass model for the Ender Crystal. */
    014        private ModelRenderer glass = new ModelRenderer(this, "glass");
    015
    016        /** The base model for the Ender Crystal. */
    017        private ModelRenderer base;
    018
    019        public ModelEnderCrystal(float par1)
    020        {
    021            this.glass.setTextureOffset(0, 0).addBox(-4.0F, -4.0F, -4.0F, 8, 8, 8);
    022            this.cube = new ModelRenderer(this, "cube");
    023            this.cube.setTextureOffset(32, 0).addBox(-4.0F, -4.0F, -4.0F, 8, 8, 8);
    024            this.base = new ModelRenderer(this, "base");
    025            this.base.setTextureOffset(0, 16).addBox(-6.0F, 0.0F, -6.0F, 12, 4, 12);
    026        }
    027
    028        /**
    029         * Sets the models various rotation angles then renders the model.
    030         */
    031        public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7)
    032        {
    033            GL11.glPushMatrix();
    034            GL11.glScalef(2.0F, 2.0F, 2.0F);
    035            GL11.glTranslatef(0.0F, -0.5F, 0.0F);
    036            this.base.render(par7);
    037            GL11.glRotatef(par3, 0.0F, 1.0F, 0.0F);
    038            GL11.glTranslatef(0.0F, 0.8F + par4, 0.0F);
    039            GL11.glRotatef(60.0F, 0.7071F, 0.0F, 0.7071F);
    040            this.glass.render(par7);
    041            float var8 = 0.875F;
    042            GL11.glScalef(var8, var8, var8);
    043            GL11.glRotatef(60.0F, 0.7071F, 0.0F, 0.7071F);
    044            GL11.glRotatef(par3, 0.0F, 1.0F, 0.0F);
    045            this.glass.render(par7);
    046            GL11.glScalef(var8, var8, var8);
    047            GL11.glRotatef(60.0F, 0.7071F, 0.0F, 0.7071F);
    048            GL11.glRotatef(par3, 0.0F, 1.0F, 0.0F);
    049            this.cube.render(par7);
    050            GL11.glPopMatrix();
    051        }
    052    }