Class RenderArmEvent

java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.client.event.RenderArmEvent
All Implemented Interfaces:
net.neoforged.bus.api.ICancellableEvent

public class RenderArmEvent extends net.neoforged.bus.api.Event implements net.neoforged.bus.api.ICancellableEvent

Fired before the player's arm is rendered in first person. This is a more targeted version of RenderHandEvent, and can be used to replace the rendering of the player's arm, such as for rendering armor on the arm or outright replacing the arm with armor.

This event is cancellable. If this event is cancelled, then the arm will not be rendered.

This event is fired on the main NeoForge event bus, only on the logical client.

  • Field Details

    • poseStack

      private final PoseStack poseStack
    • submitNodeCollector

      private final SubmitNodeCollector submitNodeCollector
    • lightCoords

      private final int lightCoords
    • skinTexture

      private final Identifier skinTexture
    • hasSleeve

      private final boolean hasSleeve
    • playerRenderState

      private final PlayerRenderState playerRenderState
    • arm

      private final HumanoidArm arm
    • armPart

      private final ModelPart armPart
  • Constructor Details

  • Method Details

    • getArm

      public HumanoidArm getArm()
      Returns the arm being rendered.
      Returns:
      the arm being rendered
    • getPoseStack

      public PoseStack getPoseStack()
      Returns the pose stack used for rendering.
      Returns:
      the pose stack used for rendering
    • getSubmitNodeCollector

      public SubmitNodeCollector getSubmitNodeCollector()
      Returns the submit node collector.
      Returns:
      the submit node collector
    • getLightCoords

      public int getLightCoords()
      Returns the amount of packed (sky and block) light for rendering.
      Returns:
      the amount of packed (sky and block) light for rendering
      See Also:
    • getSkinTexture

      public Identifier getSkinTexture()
      Returns the avatar's skin texture.
      Returns:
      the avatar's skin texture
    • hasSleeve

      public boolean hasSleeve()
      Returns whether the avatar's sleeves are showing.
      Returns:
      whether the avatar's sleeves are showing
    • getArmPart

      public ModelPart getArmPart()
      Returns the model part for the arm being rendered.
      Returns:
      the model part for the arm being rendered
    • getPlayerRenderState

      public PlayerRenderState getPlayerRenderState()
      Returns the render state of the player that is having their arm rendered.
      Returns:
      the render state of the player that is having their arm rendered