Class InstanceTree

java.lang.Object
dev.engine_room.flywheel.lib.model.part.InstanceTree

public final class InstanceTree extends Object
  • Method Details

    • create

      public static InstanceTree create(InstancerProvider provider, ModelTree meshTree)
    • instance

      @Nullable public @Nullable TransformedInstance instance()
    • initialPose

      public net.minecraft.client.model.geom.PartPose initialPose()
    • childCount

      public int childCount()
    • child

      public InstanceTree child(int index)
    • childName

      public String childName(int index)
    • childIndex

      public int childIndex(String name)
    • hasChild

      public boolean hasChild(String name)
    • child

      @Nullable public @Nullable InstanceTree child(String name)
    • childOrThrow

      public InstanceTree childOrThrow(String name)
    • traverse

      public void traverse(Consumer<? super TransformedInstance> consumer)
    • traverse

      @Experimental public void traverse(int i, ObjIntConsumer<? super TransformedInstance> consumer)
    • traverse

      @Experimental public void traverse(int i, int j, InstanceTree.ObjIntIntConsumer<? super TransformedInstance> consumer)
    • translateAndRotate

      public void translateAndRotate(Affine<?> affine, org.joml.Quaternionf tempQuaternion)
    • 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

      public void copyTransform(InstanceTree tree)
    • copyTransform

      public void copyTransform(net.minecraft.client.model.geom.ModelPart modelPart)
    • delete

      public void delete()