Class RecyclingPoseStack

java.lang.Object
com.mojang.blaze3d.vertex.PoseStack
dev.engine_room.flywheel.lib.util.RecyclingPoseStack
All Implemented Interfaces:
net.neoforged.neoforge.client.extensions.IPoseStackExtension

public class RecyclingPoseStack extends com.mojang.blaze3d.vertex.PoseStack
A PoseStack that recycles PoseStack.Pose objects.

Vanilla's PoseStack can get quite expensive to use when each game object needs to maintain their own stack. This class helps alleviate memory pressure by making Pose objects long-lived. Note that this means that you CANNOT safely store a Pose object outside the RecyclingPoseStack that created it.

  • Nested Class Summary

    Nested classes/interfaces inherited from class com.mojang.blaze3d.vertex.PoseStack

    com.mojang.blaze3d.vertex.PoseStack.Pose
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    void
     

    Methods inherited from class com.mojang.blaze3d.vertex.PoseStack

    clear, last, mulPose, mulPose, rotateAround, scale, setIdentity, translate, translate

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface net.neoforged.neoforge.client.extensions.IPoseStackExtension

    pushTransformation
  • Constructor Details

    • RecyclingPoseStack

      public RecyclingPoseStack()
  • Method Details

    • pushPose

      public void pushPose()
      Overrides:
      pushPose in class com.mojang.blaze3d.vertex.PoseStack
    • popPose

      public void popPose()
      Overrides:
      popPose in class com.mojang.blaze3d.vertex.PoseStack