Class RenderHandEvent

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

public class RenderHandEvent extends net.neoforged.bus.api.Event implements net.neoforged.bus.api.ICancellableEvent
Fired before a hand is rendered in the first person view.

This event is cancellable, and does not

invalid reference
have a result
. If this event is cancelled, then the hand will not be rendered.

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

See Also:
  • Field Details

    • hand

      private final InteractionHand hand
    • poseStack

      private final PoseStack poseStack
    • multiBufferSource

      private final MultiBufferSource multiBufferSource
    • packedLight

      private final int packedLight
    • partialTick

      private final float partialTick
    • interpolatedPitch

      private final float interpolatedPitch
    • swingProgress

      private final float swingProgress
    • equipProgress

      private final float equipProgress
    • stack

      private final ItemStack stack
  • Constructor Details

    • RenderHandEvent

      @Internal public RenderHandEvent(InteractionHand hand, PoseStack poseStack, MultiBufferSource multiBufferSource, int packedLight, float partialTick, float interpolatedPitch, float swingProgress, float equipProgress, ItemStack stack)
  • Method Details

    • getHand

      public InteractionHand getHand()
      Returns the hand being rendered.
      Returns:
      the hand being rendered
    • getPoseStack

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

      public MultiBufferSource getMultiBufferSource()
      Returns the source of rendering buffers.
      Returns:
      the source of rendering buffers
    • getPackedLight

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

      public float getPartialTick()
      Returns the partial tick.
      Returns:
      the partial tick
    • getInterpolatedPitch

      public float getInterpolatedPitch()
      Returns the interpolated pitch of the player entity.
      Returns:
      the interpolated pitch of the player entity
    • getSwingProgress

      public float getSwingProgress()
      Returns the swing progress of the hand being rendered.
      Returns:
      the swing progress of the hand being rendered
    • getEquipProgress

      public float getEquipProgress()
      Returns the progress of the equip animation, from 0.0 to 1.0.
      Returns:
      the progress of the equip animation, from 0.0 to 1.0
    • getItemStack

      public ItemStack getItemStack()
      Returns the item stack to be rendered.
      Returns:
      the item stack to be rendered