Class B3DLoader.B3DState
java.lang.Object
net.minecraftforge.client.model.b3d.B3DLoader.B3DState
- All Implemented Interfaces:
ModelState
,IForgeModelState
- Enclosing class:
- B3DLoader
-
Field Summary
Modifier and TypeFieldDescriptionprivate final B3DModel.Animation
private static com.google.common.cache.LoadingCache<org.apache.commons.lang3.tuple.Triple<B3DModel.Animation,
B3DModel.Node<?>, Integer>, Transformation> private final int
private final int
private final ModelState
private final float
-
Constructor Summary
ConstructorDescriptionB3DState
(B3DModel.Animation animation, int frame) B3DState
(B3DModel.Animation animation, int frame, int nextFrame, float progress) B3DState
(B3DModel.Animation animation, int frame, int nextFrame, float progress, ModelState parent) B3DState
(B3DModel.Animation animation, int frame, ModelState parent) -
Method Summary
Modifier and TypeMethodDescriptionint
getFrame()
int
static Transformation
getNodeMatrix
(B3DModel.Animation animation, B3DModel.Node<?> node, int frame) getNodeMatrix
(B3DModel.Node<?> node) getNodeMatrix
(B3DModel.Node<?> node, int frame) private ModelState
getParent
(ModelState parent) getPartTransformation
(Object part) float
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.resources.model.ModelState
isUvLocked
-
Field Details
-
animation
-
frame
private final int frame -
nextFrame
private final int nextFrame -
progress
private final float progress -
parent
-
cache
private static com.google.common.cache.LoadingCache<org.apache.commons.lang3.tuple.Triple<B3DModel.Animation,B3DModel.Node<?>, cacheInteger>, Transformation>
-
-
Constructor Details
-
B3DState
-
B3DState
-
B3DState
-
B3DState
public B3DState(@Nullable B3DModel.Animation animation, int frame, int nextFrame, float progress, @Nullable ModelState parent)
-
-
Method Details
-
getParent
-
getAnimation
-
getFrame
public int getFrame() -
getNextFrame
public int getNextFrame() -
getProgress
public float getProgress() -
getParent
-
getRotation
- Specified by:
getRotation
in interfaceModelState
-
getPartTransformation
- Specified by:
getPartTransformation
in interfaceIForgeModelState
- 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.
-
getNodeMatrix
-
getNodeMatrix
-
getNodeMatrix
public static Transformation getNodeMatrix(@Nullable B3DModel.Animation animation, B3DModel.Node<?> node, int frame)
-