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 Summary
FieldsModifier and TypeFieldDescriptionprivate final HumanoidArmprivate final ModelPartprivate final booleanprivate final intprivate final PlayerRenderStateprivate final PoseStackprivate final Identifierprivate final SubmitNodeCollector -
Constructor Summary
ConstructorsConstructorDescriptionRenderArmEvent(PoseStack poseStack, SubmitNodeCollector submitNodeCollector, int lightCoords, Identifier skinTexture, boolean hasSleeve, PlayerRenderState playerRenderState, HumanoidArm arm, ModelPart armPart) -
Method Summary
Modifier and TypeMethodDescriptiongetArm()Returns the arm being rendered.Returns the model part for the arm being rendered.intReturns the amount of packed (sky and block) light for rendering.Returns the render state of the player that is having their arm rendered.Returns the pose stack used for rendering.Returns the avatar's skin texture.Returns the submit node collector.booleanReturns whether the avatar's sleeves are showing.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.neoforged.bus.api.ICancellableEvent
isCanceled, setCanceled
-
Field Details
-
poseStack
-
submitNodeCollector
-
lightCoords
private final int lightCoords -
skinTexture
-
hasSleeve
private final boolean hasSleeve -
playerRenderState
-
arm
-
armPart
-
-
Constructor Details
-
RenderArmEvent
@Internal public RenderArmEvent(PoseStack poseStack, SubmitNodeCollector submitNodeCollector, int lightCoords, Identifier skinTexture, boolean hasSleeve, PlayerRenderState playerRenderState, HumanoidArm arm, ModelPart armPart)
-
-
Method Details
-
getArm
-
getPoseStack
Returns the pose stack used for rendering.- Returns:
- the pose stack used for rendering
-
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
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
Returns the model part for the arm being rendered.- Returns:
- the model part for the arm being rendered
-
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
-