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, and does not

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

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

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final net.minecraft.world.entity.HumanoidArm
     
    private final net.minecraft.client.renderer.MultiBufferSource
     
    private final int
     
    private final net.minecraft.client.player.AbstractClientPlayer
     
    private final com.mojang.blaze3d.vertex.PoseStack
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    RenderArmEvent(com.mojang.blaze3d.vertex.PoseStack poseStack, net.minecraft.client.renderer.MultiBufferSource multiBufferSource, int packedLight, net.minecraft.client.player.AbstractClientPlayer player, net.minecraft.world.entity.HumanoidArm arm)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    net.minecraft.world.entity.HumanoidArm
    Returns the arm being rendered.
    net.minecraft.client.renderer.MultiBufferSource
    Returns the source of rendering buffers.
    int
    Returns the amount of packed (sky and block) light for rendering.
    net.minecraft.client.player.AbstractClientPlayer
    Returns the client player that is having their arm rendered.
    com.mojang.blaze3d.vertex.PoseStack
    Returns the pose stack used for rendering.

    Methods inherited from class java.lang.Object

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

    Methods inherited from interface net.neoforged.bus.api.ICancellableEvent

    isCanceled, setCanceled
  • Field Details

    • poseStack

      private final com.mojang.blaze3d.vertex.PoseStack poseStack
    • multiBufferSource

      private final net.minecraft.client.renderer.MultiBufferSource multiBufferSource
    • packedLight

      private final int packedLight
    • player

      private final net.minecraft.client.player.AbstractClientPlayer player
    • arm

      private final net.minecraft.world.entity.HumanoidArm arm
  • Constructor Details

    • RenderArmEvent

      @Internal public RenderArmEvent(com.mojang.blaze3d.vertex.PoseStack poseStack, net.minecraft.client.renderer.MultiBufferSource multiBufferSource, int packedLight, net.minecraft.client.player.AbstractClientPlayer player, net.minecraft.world.entity.HumanoidArm arm)
  • Method Details

    • getArm

      public net.minecraft.world.entity.HumanoidArm getArm()
      Returns the arm being rendered.
      Returns:
      the arm being rendered
    • getPoseStack

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

      public net.minecraft.client.renderer.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:
      • LightTexture
    • getPlayer

      public net.minecraft.client.player.AbstractClientPlayer getPlayer()
      Returns the client player that is having their arm rendered. In general, this will be the same as Minecraft.player.
      Returns:
      the client player that is having their arm rendered