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
.
If this event is cancelled, then the hand will not be rendered.invalid reference
have a result
This event is fired on the main Forge event bus, only on the logical client.
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionprivate final float
private final InteractionHand
private final float
private final MultiBufferSource
private final int
private final float
private final PoseStack
private final ItemStack
private final float
-
Constructor Summary
ConstructorDescriptionRenderHandEvent
(InteractionHand hand, PoseStack poseStack, MultiBufferSource multiBufferSource, int packedLight, float partialTick, float interpolatedPitch, float swingProgress, float equipProgress, ItemStack stack) -
Method Summary
Modifier and TypeMethodDescriptionfloat
Returns the progress of the equip animation, from0.0
to1.0
.getHand()
Returns the hand being rendered.float
Returns the interpolated pitch of the player entity.Returns the item stack to be rendered.Returns the source of rendering buffers.int
Returns the amount of packed (sky and block) light for rendering.float
Returns the partial tick.Returns the pose stack used for rendering.float
Returns the swing progress of the hand being rendered.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
-
hand
-
poseStack
-
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
-
-
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
Returns the hand being rendered.- Returns:
- the hand 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:
-
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, from0.0
to1.0
.- Returns:
- the progress of the equip animation, from
0.0
to1.0
-
getItemStack
Returns the item stack to be rendered.- Returns:
- the item stack to be rendered
-