    001    package net.minecraft.src;
    002
    003    import cpw.mods.fml.common.Side;
    004    import cpw.mods.fml.common.asm.SideOnly;
    005
    006    @SideOnly(Side.CLIENT)
    007    public class ModelMinecart extends ModelBase
    008    {
    009        public ModelRenderer[] sideModels = new ModelRenderer[7];
    010
    011        public ModelMinecart()
    012        {
    013            this.sideModels[0] = new ModelRenderer(this, 0, 10);
    014            this.sideModels[1] = new ModelRenderer(this, 0, 0);
    015            this.sideModels[2] = new ModelRenderer(this, 0, 0);
    016            this.sideModels[3] = new ModelRenderer(this, 0, 0);
    017            this.sideModels[4] = new ModelRenderer(this, 0, 0);
    018            this.sideModels[5] = new ModelRenderer(this, 44, 10);
    019            byte var1 = 20;
    020            byte var2 = 8;
    021            byte var3 = 16;
    022            byte var4 = 4;
    023            this.sideModels[0].addBox((float)(-var1 / 2), (float)(-var3 / 2), -1.0F, var1, var3, 2, 0.0F);
    024            this.sideModels[0].setRotationPoint(0.0F, (float)var4, 0.0F);
    025            this.sideModels[5].addBox((float)(-var1 / 2 + 1), (float)(-var3 / 2 + 1), -1.0F, var1 - 2, var3 - 2, 1, 0.0F);
    026            this.sideModels[5].setRotationPoint(0.0F, (float)var4, 0.0F);
    027            this.sideModels[1].addBox((float)(-var1 / 2 + 2), (float)(-var2 - 1), -1.0F, var1 - 4, var2, 2, 0.0F);
    028            this.sideModels[1].setRotationPoint((float)(-var1 / 2 + 1), (float)var4, 0.0F);
    029            this.sideModels[2].addBox((float)(-var1 / 2 + 2), (float)(-var2 - 1), -1.0F, var1 - 4, var2, 2, 0.0F);
    030            this.sideModels[2].setRotationPoint((float)(var1 / 2 - 1), (float)var4, 0.0F);
    031            this.sideModels[3].addBox((float)(-var1 / 2 + 2), (float)(-var2 - 1), -1.0F, var1 - 4, var2, 2, 0.0F);
    032            this.sideModels[3].setRotationPoint(0.0F, (float)var4, (float)(-var3 / 2 + 1));
    033            this.sideModels[4].addBox((float)(-var1 / 2 + 2), (float)(-var2 - 1), -1.0F, var1 - 4, var2, 2, 0.0F);
    034            this.sideModels[4].setRotationPoint(0.0F, (float)var4, (float)(var3 / 2 - 1));
    035            this.sideModels[0].rotateAngleX = ((float)Math.PI / 2F);
    036            this.sideModels[1].rotateAngleY = ((float)Math.PI * 3F / 2F);
    037            this.sideModels[2].rotateAngleY = ((float)Math.PI / 2F);
    038            this.sideModels[3].rotateAngleY = (float)Math.PI;
    039            this.sideModels[5].rotateAngleX = -((float)Math.PI / 2F);
    040        }
    041
    042        /**
    043         * Sets the models various rotation angles then renders the model.
    044         */
    045        public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7)
    046        {
    047            this.sideModels[5].rotationPointY = 4.0F - par4;
    048
    049            for (int var8 = 0; var8 < 6; ++var8)
    050            {
    051                this.sideModels[var8].render(par7);
    052            }
    053        }
    054    }