Package net.minecraftforge.client.model
Class SimpleModelTransform
- java.lang.Object
-
- net.minecraftforge.client.model.SimpleModelTransform
-
- All Implemented Interfaces:
IModelTransform,IForgeModelTransform
public final class SimpleModelTransform extends java.lang.Object implements IModelTransform
Simple implementation of IModelState via a map and a default value.
-
-
Field Summary
Fields Modifier and Type Field Description private TransformationMatrixbasestatic SimpleModelTransformIDENTITYprivate com.google.common.collect.ImmutableMap<?,TransformationMatrix>map
-
Constructor Summary
Constructors Constructor Description SimpleModelTransform(com.google.common.collect.ImmutableMap<?,TransformationMatrix> map)SimpleModelTransform(com.google.common.collect.ImmutableMap<?,TransformationMatrix> map, TransformationMatrix base)SimpleModelTransform(TransformationMatrix base)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TransformationMatrixgetPartTransformation(java.lang.Object part)TransformationMatrixgetRotation()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.minecraft.client.renderer.model.IModelTransform
isUvLocked
-
-
-
-
Field Detail
-
IDENTITY
public static final SimpleModelTransform IDENTITY
-
map
private final com.google.common.collect.ImmutableMap<?,TransformationMatrix> map
-
base
private final TransformationMatrix base
-
-
Constructor Detail
-
SimpleModelTransform
public SimpleModelTransform(com.google.common.collect.ImmutableMap<?,TransformationMatrix> map)
-
SimpleModelTransform
public SimpleModelTransform(TransformationMatrix base)
-
SimpleModelTransform
public SimpleModelTransform(com.google.common.collect.ImmutableMap<?,TransformationMatrix> map, TransformationMatrix base)
-
-
Method Detail
-
getRotation
public TransformationMatrix getRotation()
- Specified by:
getRotationin interfaceIModelTransform
-
getPartTransformation
public TransformationMatrix getPartTransformation(java.lang.Object part)
- Specified by:
getPartTransformationin interfaceIForgeModelTransform- Parameters:
part- Part of the model we are wanting to transform. An empty optional means we want a transform for the entire model.- Returns:
- A transformation to apply to the part, if any. The coordinate system of the transform is determined by the part type.
-
-