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
FieldsModifier and TypeFieldDescriptionprivate final float
private final net.minecraft.world.InteractionHand
private final float
private final net.minecraft.client.renderer.MultiBufferSource
private final int
private final float
private final com.mojang.blaze3d.vertex.PoseStack
private final net.minecraft.world.item.ItemStack
private final float
-
Constructor Summary
ConstructorsConstructorDescriptionRenderHandEvent
(net.minecraft.world.InteractionHand hand, com.mojang.blaze3d.vertex.PoseStack poseStack, net.minecraft.client.renderer.MultiBufferSource multiBufferSource, int packedLight, float partialTick, float interpolatedPitch, float swingProgress, float equipProgress, net.minecraft.world.item.ItemStack stack) -
Method Summary
Modifier and TypeMethodDescriptionfloat
Returns the progress of the equip animation, from0.0
to1.0
.net.minecraft.world.InteractionHand
getHand()
Returns the hand being rendered.float
Returns the interpolated pitch of the player entity.net.minecraft.world.item.ItemStack
Returns the item stack to be rendered.net.minecraft.client.renderer.MultiBufferSource
Returns the source of rendering buffers.int
Returns the amount of packed (sky and block) light for rendering.float
Returns the partial tick.com.mojang.blaze3d.vertex.PoseStack
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
private final net.minecraft.world.InteractionHand hand -
poseStack
private final com.mojang.blaze3d.vertex.PoseStack poseStack -
multiBufferSource
private final net.minecraft.client.renderer.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 net.minecraft.world.item.ItemStack stack
-
-
Constructor Details
-
RenderHandEvent
@Internal public RenderHandEvent(net.minecraft.world.InteractionHand hand, com.mojang.blaze3d.vertex.PoseStack poseStack, net.minecraft.client.renderer.MultiBufferSource multiBufferSource, int packedLight, float partialTick, float interpolatedPitch, float swingProgress, float equipProgress, net.minecraft.world.item.ItemStack stack)
-
-
Method Details
-
getHand
public net.minecraft.world.InteractionHand getHand()Returns the hand being rendered.- Returns:
- the hand 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:
-
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
public net.minecraft.world.item.ItemStack getItemStack()Returns the item stack to be rendered.- Returns:
- the item stack to be rendered
-