    001package net.minecraft.client.model;
    002
    003import cpw.mods.fml.relauncher.Side;
    004import cpw.mods.fml.relauncher.SideOnly;
    005import java.util.ArrayList;
    006import java.util.HashMap;
    007import java.util.List;
    008import java.util.Map;
    009import java.util.Random;
    010import net.minecraft.entity.Entity;
    011import net.minecraft.entity.EntityLiving;
    012
    013public abstract class ModelBase
    014{
    015    public float onGround;
    016    public boolean isRiding = false;
    017
    018    /**
    019     * This is a list of all the boxes (ModelRenderer.class) in the current model.
    020     */
    021    public List boxList = new ArrayList();
    022    public boolean isChild = true;
    023
    024    /** A mapping for all texture offsets */
    025    private Map modelTextureMap = new HashMap();
    026    public int textureWidth = 64;
    027    public int textureHeight = 32;
    028
    029    /**
    030     * Sets the models various rotation angles then renders the model.
    031     */
    032    public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) {}
    033
    034    /**
    035     * Sets the model's various rotation angles. For bipeds, par1 and par2 are used for animating the movement of arms
    036     * and legs, where par1 represents the time(so that arms and legs swing back and forth) and par2 represents how
    037     * "far" arms and legs can swing at most.
    038     */
    039    public void setRotationAngles(float par1, float par2, float par3, float par4, float par5, float par6, Entity par7Entity) {}
    040
    041    /**
    042     * Used for easily adding entity-dependent animations. The second and third float params here are the same second
    043     * and third as in the setRotationAngles method.
    044     */
    045    public void setLivingAnimations(EntityLiving par1EntityLiving, float par2, float par3, float par4) {}
    046
    047    public ModelRenderer getRandomModelBox(Random par1Random)
    048    {
    049        return (ModelRenderer)this.boxList.get(par1Random.nextInt(this.boxList.size()));
    050    }
    051
    052    protected void setTextureOffset(String par1Str, int par2, int par3)
    053    {
    054        this.modelTextureMap.put(par1Str, new TextureOffset(par2, par3));
    055    }
    056
    057    public TextureOffset getTextureOffset(String par1Str)
    058    {
    059        return (TextureOffset)this.modelTextureMap.get(par1Str);
    060    }
    061}