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