001package net.minecraft.client.model; 002 003import cpw.mods.fml.relauncher.Side; 004import cpw.mods.fml.relauncher.SideOnly; 005import net.minecraft.entity.Entity; 006 007@SideOnly(Side.CLIENT) 008public class ModelBoat extends ModelBase 009{ 010 public ModelRenderer[] boatSides = new ModelRenderer[5]; 011 012 public ModelBoat() 013 { 014 this.boatSides[0] = new ModelRenderer(this, 0, 8); 015 this.boatSides[1] = new ModelRenderer(this, 0, 0); 016 this.boatSides[2] = new ModelRenderer(this, 0, 0); 017 this.boatSides[3] = new ModelRenderer(this, 0, 0); 018 this.boatSides[4] = new ModelRenderer(this, 0, 0); 019 byte b0 = 24; 020 byte b1 = 6; 021 byte b2 = 20; 022 byte b3 = 4; 023 this.boatSides[0].addBox((float)(-b0 / 2), (float)(-b2 / 2 + 2), -3.0F, b0, b2 - 4, 4, 0.0F); 024 this.boatSides[0].setRotationPoint(0.0F, (float)b3, 0.0F); 025 this.boatSides[1].addBox((float)(-b0 / 2 + 2), (float)(-b1 - 1), -1.0F, b0 - 4, b1, 2, 0.0F); 026 this.boatSides[1].setRotationPoint((float)(-b0 / 2 + 1), (float)b3, 0.0F); 027 this.boatSides[2].addBox((float)(-b0 / 2 + 2), (float)(-b1 - 1), -1.0F, b0 - 4, b1, 2, 0.0F); 028 this.boatSides[2].setRotationPoint((float)(b0 / 2 - 1), (float)b3, 0.0F); 029 this.boatSides[3].addBox((float)(-b0 / 2 + 2), (float)(-b1 - 1), -1.0F, b0 - 4, b1, 2, 0.0F); 030 this.boatSides[3].setRotationPoint(0.0F, (float)b3, (float)(-b2 / 2 + 1)); 031 this.boatSides[4].addBox((float)(-b0 / 2 + 2), (float)(-b1 - 1), -1.0F, b0 - 4, b1, 2, 0.0F); 032 this.boatSides[4].setRotationPoint(0.0F, (float)b3, (float)(b2 / 2 - 1)); 033 this.boatSides[0].rotateAngleX = ((float)Math.PI / 2F); 034 this.boatSides[1].rotateAngleY = ((float)Math.PI * 3F / 2F); 035 this.boatSides[2].rotateAngleY = ((float)Math.PI / 2F); 036 this.boatSides[3].rotateAngleY = (float)Math.PI; 037 } 038 039 /** 040 * Sets the models various rotation angles then renders the model. 041 */ 042 public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) 043 { 044 for (int i = 0; i < 5; ++i) 045 { 046 this.boatSides[i].render(par7); 047 } 048 } 049}