Class InstanceTree
java.lang.Object
dev.engine_room.flywheel.lib.model.part.InstanceTree
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionchild(int index) @Nullable InstanceTreeintintchildIndex(String name) childName(int index) childOrThrow(String name) voidcopyTransform(InstanceTree tree) voidcopyTransform(net.minecraft.client.model.geom.ModelPart modelPart) static InstanceTreecreate(InstancerProvider provider, ModelTree meshTree) voiddelete()booleannet.minecraft.client.model.geom.PartPose@Nullable TransformedInstanceinstance()voidloadPose(net.minecraft.client.model.geom.PartPose pose) voidoffsetPos(float xOffset, float yOffset, float zOffset) voidoffsetPos(org.joml.Vector3fc offset) voidoffsetRotation(float xOffset, float yOffset, float zOffset) voidoffsetRotation(org.joml.Vector3fc offset) voidoffsetScale(float xOffset, float yOffset, float zOffset) voidoffsetScale(org.joml.Vector3fc offset) voidoffsetXPos(float xOffset) voidoffsetXRot(float xOffset) voidoffsetXScale(float xOffset) voidoffsetYPos(float yOffset) voidoffsetYRot(float yOffset) voidoffsetYScale(float yOffset) voidoffsetZPos(float zOffset) voidoffsetZRot(float zOffset) voidoffsetZScale(float zOffset) voidpos(float x, float y, float z) voidpropagateAnimation(org.joml.Matrix4fc initialPose, boolean force) Propagate pose transformations to this tree and all its children.voidvoidrotation(float xRot, float yRot, float zRot) voidscale(float xScale, float yScale, float zScale) booleanskipDraw()voidskipDraw(boolean skipDraw) Set the visibility of this specific node in the tree.net.minecraft.client.model.geom.PartPosevoidtranslateAndRotate(com.mojang.blaze3d.vertex.PoseStack poseStack, org.joml.Quaternionf tempQuaternion) voidtranslateAndRotate(Affine<?> affine, org.joml.Quaternionf tempQuaternion) voidtranslateAndRotate(org.joml.Matrix4f pose) voidtraverse(int i, int j, InstanceTree.ObjIntIntConsumer<? super TransformedInstance> consumer) voidtraverse(int i, ObjIntConsumer<? super TransformedInstance> consumer) voidtraverse(Consumer<? super TransformedInstance> consumer) voidupdateInstances(org.joml.Matrix4fc initialPose) Update the instances in this tree, assuming initialPose changes.voidupdateInstancesStatic(org.joml.Matrix4fc initialPose) Update the instances in this tree, assuming initialPose doesn't change between invocations.booleanvisible()voidvisible(boolean visible) Set the visibility of this tree and all its children, recursively.floatxPos()voidxPos(float x) floatxRot()voidxRot(float xRot) floatxScale()voidxScale(float xScale) floatyPos()voidyPos(float y) floatyRot()voidyRot(float yRot) floatyScale()voidyScale(float yScale) floatzPos()voidzPos(float z) floatzRot()voidzRot(float zRot) floatzScale()voidzScale(float zScale)
-
Method Details
-
create
-
instance
-
initialPose
public net.minecraft.client.model.geom.PartPose initialPose() -
childCount
public int childCount() -
child
-
childName
-
childIndex
-
hasChild
-
child
-
childOrThrow
-
traverse
-
traverse
-
traverse
@Experimental public void traverse(int i, int j, InstanceTree.ObjIntIntConsumer<? super TransformedInstance> consumer) -
translateAndRotate
-
translateAndRotate
public void translateAndRotate(com.mojang.blaze3d.vertex.PoseStack poseStack, org.joml.Quaternionf tempQuaternion) -
translateAndRotate
public void translateAndRotate(org.joml.Matrix4f pose) -
updateInstances
public void updateInstances(org.joml.Matrix4fc initialPose) Update the instances in this tree, assuming initialPose changes.This is the preferred method for entity visuals, or if you're not sure which you need.
- Parameters:
initialPose- The root transformation matrix.
-
updateInstancesStatic
public void updateInstancesStatic(org.joml.Matrix4fc initialPose) Update the instances in this tree, assuming initialPose doesn't change between invocations.This is the preferred method for block entity visuals.
- Parameters:
initialPose- The root transformation matrix.
-
propagateAnimation
public void propagateAnimation(org.joml.Matrix4fc initialPose, boolean force) Propagate pose transformations to this tree and all its children.- Parameters:
initialPose- The root transformation matrix.force- Whether to force the update even if this node's transformations haven't changed.
-
visible
public void visible(boolean visible) Set the visibility of this tree and all its children, recursively.- Parameters:
visible- Whether to make this tree visible.
-
skipDraw
public void skipDraw(boolean skipDraw) Set the visibility of this specific node in the tree.- Parameters:
skipDraw- Whether this node should skip rendering.
-
visible
public boolean visible() -
skipDraw
public boolean skipDraw() -
xPos
public float xPos() -
yPos
public float yPos() -
zPos
public float zPos() -
xRot
public float xRot() -
yRot
public float yRot() -
zRot
public float zRot() -
xScale
public float xScale() -
yScale
public float yScale() -
zScale
public float zScale() -
xPos
public void xPos(float x) -
yPos
public void yPos(float y) -
zPos
public void zPos(float z) -
pos
public void pos(float x, float y, float z) -
xRot
public void xRot(float xRot) -
yRot
public void yRot(float yRot) -
zRot
public void zRot(float zRot) -
rotation
public void rotation(float xRot, float yRot, float zRot) -
xScale
public void xScale(float xScale) -
yScale
public void yScale(float yScale) -
zScale
public void zScale(float zScale) -
scale
public void scale(float xScale, float yScale, float zScale) -
offsetPos
public void offsetPos(float xOffset, float yOffset, float zOffset) -
offsetXPos
public void offsetXPos(float xOffset) -
offsetYPos
public void offsetYPos(float yOffset) -
offsetZPos
public void offsetZPos(float zOffset) -
offsetPos
public void offsetPos(org.joml.Vector3fc offset) -
offsetRotation
public void offsetRotation(float xOffset, float yOffset, float zOffset) -
offsetXRot
public void offsetXRot(float xOffset) -
offsetYRot
public void offsetYRot(float yOffset) -
offsetZRot
public void offsetZRot(float zOffset) -
offsetRotation
public void offsetRotation(org.joml.Vector3fc offset) -
offsetScale
public void offsetScale(float xOffset, float yOffset, float zOffset) -
offsetXScale
public void offsetXScale(float xOffset) -
offsetYScale
public void offsetYScale(float yOffset) -
offsetZScale
public void offsetZScale(float zOffset) -
offsetScale
public void offsetScale(org.joml.Vector3fc offset) -
storePose
public net.minecraft.client.model.geom.PartPose storePose() -
loadPose
public void loadPose(net.minecraft.client.model.geom.PartPose pose) -
resetPose
public void resetPose() -
copyTransform
-
copyTransform
public void copyTransform(net.minecraft.client.model.geom.ModelPart modelPart) -
delete
public void delete()
-