public class MalisisModel extends java.lang.Object implements ITransformable.Translate, ITransformable.Rotate, ITransformable.Scale, java.lang.Iterable<Shape>
ResourceLocation is provided, the model will be populated using the specified IModelLoader. If no loaded is giver,
it will be determined by the model file extension.ITransformable.Alpha, ITransformable.Brightness, ITransformable.Color, ITransformable.Position<T>, ITransformable.Rotate, ITransformable.Scale, ITransformable.Size<T>, ITransformable.Translate| Modifier and Type | Field and Description |
|---|---|
protected com.google.common.collect.Multimap<java.lang.String,Animation<Shape>> |
animations
Animations for the Shapes in this
MalisisModel |
protected java.util.Map<java.lang.String,Shape> |
shapes
Shapes building this
MalisisModel. |
| Constructor and Description |
|---|
MalisisModel()
Instantiates a new empty
MalisisModel. |
MalisisModel(IModelLoader loader)
Instantiates a new
MalisisModel with the specified IModelLoader. |
MalisisModel(IModelLoader loader,
IAnimationLoader animLoader) |
MalisisModel(net.minecraft.util.ResourceLocation resource)
Instantiates a new
MalisisModel. |
MalisisModel(Shape... shapes)
Instantiates a new
MalisisModel with the specified shapes. |
| Modifier and Type | Method and Description |
|---|---|
void |
addAnimation(Animation<Shape> animation)
Adds an
Animation to this MalisisModel with a default name. |
void |
addAnimation(java.lang.String name,
Animation<Shape> animation)
Adds an
Animation to this MalisisModel with the specified name. |
void |
addAnimations(Animation<Shape>... animations)
Adds the
Animation to this MalisisModel with default names. |
void |
addShape(Shape shape)
Adds a
Shape to this MalisisModel with a default name. |
void |
addShape(java.lang.String name,
Shape shape)
Adds a
Shape to this MalisisModel with the specified name. |
void |
addShapes(Shape... shapes)
Adds the
shapes to this MalisisModel with default names. |
boolean |
animate(Animation<Shape> animation,
Timer timer)
|
boolean |
animate(java.lang.String name,
Timer timer)
Animates all the animations of this model with the specified name based on the
Timer |
java.util.Set<java.lang.String> |
getAnimatedShapes() |
java.util.Collection<Animation<Shape>> |
getAnimation(java.lang.String name)
Gets the
Animation with the specified name. |
java.util.Set<java.lang.String> |
getAnimationsList()
Gets the list of animation names in this
MalisisModel. |
Shape |
getShape(java.lang.String name)
Gets the
Shape with the specified name. |
java.util.Set<java.lang.String> |
getShapeNames()
Gets the list of
Shape names in this MalisisModel. |
java.util.Iterator<Shape> |
iterator() |
protected void |
load(IAnimationLoader loader)
Load the animations from the specified
IAnimationLoader. |
protected void |
load(IModelLoader loader)
Loads this
MalisisModel from the specified IModelLoader. |
void |
render(MalisisRenderer<?> renderer)
|
void |
render(MalisisRenderer<?> renderer,
RenderParameters rp)
Renders all the
shapes of this MalisisModel using the specified MalisisRenderer and
RenderParameters. |
void |
render(MalisisRenderer<?> renderer,
java.lang.String name)
|
void |
render(MalisisRenderer<?> renderer,
java.lang.String name,
RenderParameters rp)
Renders a specific
Shape of this MalisisModel using the specified MalisisRenderer and
RenderParameters. |
void |
resetState()
Resets the state of this
MalisisModel. |
void |
rotate(float angle,
float x,
float y,
float z,
float offsetX,
float offsetY,
float offsetZ) |
void |
scale(float x,
float y,
float z,
float offsetX,
float offsetY,
float offsetZ) |
void |
storeState()
Stores the state of this
MalisisModel. |
void |
translate(float x,
float y,
float z) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitrotateprotected java.util.Map<java.lang.String,Shape> shapes
MalisisModel.protected com.google.common.collect.Multimap<java.lang.String,Animation<Shape>> animations
MalisisModelpublic MalisisModel()
public MalisisModel(Shape... shapes)
MalisisModel with the specified shapes.shapes - the shapespublic MalisisModel(IModelLoader loader)
MalisisModel with the specified IModelLoader.loader - the loaderpublic MalisisModel(IModelLoader loader, IAnimationLoader animLoader)
public MalisisModel(net.minecraft.util.ResourceLocation resource)
MalisisModel. The loader will be determined by the model file extension.resource - the ResourceLocation for the model fileprotected void load(IModelLoader loader)
MalisisModel from the specified IModelLoader.loader - the loaderprotected void load(IAnimationLoader loader)
IAnimationLoader.loader - the loaderpublic void addShapes(Shape... shapes)
shapes to this MalisisModel with default names.shapes - the shapespublic void addShape(Shape shape)
Shape to this MalisisModel with a default name.shape - the shapepublic void addShape(java.lang.String name,
Shape shape)
Shape to this MalisisModel with the specified name.name - the name of the shapeshape - the shapepublic Shape getShape(java.lang.String name)
Shape with the specified name.name - the name of the shapepublic java.util.Set<java.lang.String> getShapeNames()
Shape names in this MalisisModel.public void addAnimations(Animation<Shape>... animations)
Animation to this MalisisModel with default names.animations - the animationspublic void addAnimation(Animation<Shape> animation)
Animation to this MalisisModel with a default name.animation - the animationpublic void addAnimation(java.lang.String name,
Animation<Shape> animation)
Animation to this MalisisModel with the specified name.name - the nameanimation - the animationpublic java.util.Collection<Animation<Shape>> getAnimation(java.lang.String name)
Animation with the specified name.name - the namepublic java.util.Set<java.lang.String> getAnimatedShapes()
public java.util.Set<java.lang.String> getAnimationsList()
MalisisModel.public void render(MalisisRenderer<?> renderer)
renderer - the rendererpublic void render(MalisisRenderer<?> renderer, RenderParameters rp)
shapes of this MalisisModel using the specified MalisisRenderer and
RenderParameters.renderer - the rendererrp - the parameterspublic void render(MalisisRenderer<?> renderer, java.lang.String name)
renderer - the renderername - the name of the shapepublic void render(MalisisRenderer<?> renderer, java.lang.String name, RenderParameters rp)
Shape of this MalisisModel using the specified MalisisRenderer and
RenderParameters.renderer - the renderername - the name of the shaperp - the paramterspublic boolean animate(java.lang.String name,
Timer timer)
Timername - the nametimer - the timerpublic boolean animate(Animation<Shape> animation, Timer timer)
animation - the animationtimer - the timerpublic void storeState()
MalisisModel. Stores the state of all the shapes contained by this model.public void resetState()
MalisisModel. Resets the state of all the shapes contained by this model.public void translate(float x,
float y,
float z)
translate in interface ITransformable.Translatepublic void rotate(float angle,
float x,
float y,
float z,
float offsetX,
float offsetY,
float offsetZ)
rotate in interface ITransformable.Rotatepublic void scale(float x,
float y,
float z,
float offsetX,
float offsetY,
float offsetZ)
scale in interface ITransformable.Scale