Package net.minecraftforge.client.event
Class RenderArmEvent
java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.client.event.RenderArmEvent
public class RenderArmEvent
extends net.minecraftforge.eventbus.api.Event
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 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.
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraftforge.eventbus.api.Event
net.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result
-
Field Summary
Modifier and TypeFieldDescriptionprivate final HumanoidArm
private final MultiBufferSource
private final int
private final AbstractClientPlayer
private final PoseStack
-
Constructor Summary
ConstructorDescriptionRenderArmEvent
(PoseStack poseStack, MultiBufferSource multiBufferSource, int packedLight, AbstractClientPlayer player, HumanoidArm arm) -
Method Summary
Modifier and TypeMethodDescriptiongetArm()
Returns the arm being rendered.Returns the source of rendering buffers.int
Returns the amount of packed (sky and block) light for rendering.Returns the client player that is having their arm rendered.Returns the pose stack used for rendering.Methods inherited from class net.minecraftforge.eventbus.api.Event
getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult
-
Field Details
-
poseStack
-
multiBufferSource
-
packedLight
private final int packedLight -
player
-
arm
-
-
Constructor Details
-
RenderArmEvent
@Internal public RenderArmEvent(PoseStack poseStack, MultiBufferSource multiBufferSource, int packedLight, AbstractClientPlayer player, HumanoidArm arm)
-
-
Method Details
-
getArm
Returns the arm being rendered.- Returns:
- the arm being rendered
-
getPoseStack
Returns the pose stack used for rendering.- Returns:
- the pose stack used for rendering
-
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:
-
getPlayer
Returns the client player that is having their arm rendered. In general, this will be the same asMinecraft.player
.- Returns:
- the client player that is having their arm rendered
-