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