001 package net.minecraft.client.model; 002 003 import cpw.mods.fml.relauncher.Side; 004 import cpw.mods.fml.relauncher.SideOnly; 005 006 @SideOnly(Side.CLIENT) 007 public class ModelChest extends ModelBase 008 { 009 /** The chest lid in the chest's model. */ 010 public ModelRenderer chestLid = (new ModelRenderer(this, 0, 0)).setTextureSize(64, 64); 011 012 /** The model of the bottom of the chest. */ 013 public ModelRenderer chestBelow; 014 015 /** The chest's knob in the chest model. */ 016 public ModelRenderer chestKnob; 017 018 public ModelChest() 019 { 020 this.chestLid.addBox(0.0F, -5.0F, -14.0F, 14, 5, 14, 0.0F); 021 this.chestLid.rotationPointX = 1.0F; 022 this.chestLid.rotationPointY = 7.0F; 023 this.chestLid.rotationPointZ = 15.0F; 024 this.chestKnob = (new ModelRenderer(this, 0, 0)).setTextureSize(64, 64); 025 this.chestKnob.addBox(-1.0F, -2.0F, -15.0F, 2, 4, 1, 0.0F); 026 this.chestKnob.rotationPointX = 8.0F; 027 this.chestKnob.rotationPointY = 7.0F; 028 this.chestKnob.rotationPointZ = 15.0F; 029 this.chestBelow = (new ModelRenderer(this, 0, 19)).setTextureSize(64, 64); 030 this.chestBelow.addBox(0.0F, 0.0F, 0.0F, 14, 10, 14, 0.0F); 031 this.chestBelow.rotationPointX = 1.0F; 032 this.chestBelow.rotationPointY = 6.0F; 033 this.chestBelow.rotationPointZ = 1.0F; 034 } 035 036 /** 037 * This method renders out all parts of the chest model. 038 */ 039 public void renderAll() 040 { 041 this.chestKnob.rotateAngleX = this.chestLid.rotateAngleX; 042 this.chestLid.render(0.0625F); 043 this.chestKnob.render(0.0625F); 044 this.chestBelow.render(0.0625F); 045 } 046 }