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 ModelSlime extends ModelBase 008 { 009 /** The slime's bodies, both the inside box and the outside box */ 010 ModelRenderer slimeBodies; 011 012 /** The slime's right eye */ 013 ModelRenderer slimeRightEye; 014 015 /** The slime's left eye */ 016 ModelRenderer slimeLeftEye; 017 018 /** The slime's mouth */ 019 ModelRenderer slimeMouth; 020 021 public ModelSlime(int par1) 022 { 023 this.slimeBodies = new ModelRenderer(this, 0, par1); 024 this.slimeBodies.addBox(-4.0F, 16.0F, -4.0F, 8, 8, 8); 025 026 if (par1 > 0) 027 { 028 this.slimeBodies = new ModelRenderer(this, 0, par1); 029 this.slimeBodies.addBox(-3.0F, 17.0F, -3.0F, 6, 6, 6); 030 this.slimeRightEye = new ModelRenderer(this, 32, 0); 031 this.slimeRightEye.addBox(-3.25F, 18.0F, -3.5F, 2, 2, 2); 032 this.slimeLeftEye = new ModelRenderer(this, 32, 4); 033 this.slimeLeftEye.addBox(1.25F, 18.0F, -3.5F, 2, 2, 2); 034 this.slimeMouth = new ModelRenderer(this, 32, 8); 035 this.slimeMouth.addBox(0.0F, 21.0F, -3.5F, 1, 1, 1); 036 } 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 this.setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity); 045 this.slimeBodies.render(par7); 046 047 if (this.slimeRightEye != null) 048 { 049 this.slimeRightEye.render(par7); 050 this.slimeLeftEye.render(par7); 051 this.slimeMouth.render(par7); 052 } 053 } 054 }