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 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(net.minecraft.util.ResourceLocation resource)
Instantiates a new
MalisisModel . |
Modifier and Type | Method and Description |
---|---|
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. |
Shape |
getShape(java.lang.String name)
Gets the
Shape with the specified name. |
java.util.Iterator<Shape> |
iterator() |
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) |
protected java.util.Map<java.lang.String,Shape> shapes
MalisisModel
.public MalisisModel()
public MalisisModel(IModelLoader loader)
MalisisModel
with the specified IModelLoader
.loader
- the loaderpublic 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 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 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 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.Translate
public void rotate(float angle, float x, float y, float z, float offsetX, float offsetY, float offsetZ)
rotate
in interface ITransformable.Rotate
public void scale(float x, float y, float z, float offsetX, float offsetY, float offsetZ)
scale
in interface ITransformable.Scale