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