Package net.minecraftforge.client.event
Class RenderHandEvent
java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.client.event.RenderHandEvent
public class RenderHandEvent
extends net.minecraftforge.eventbus.api.Event
This event is fired on the
MinecraftForge.EVENT_BUS
whenever a hand is rendered in first person.
Canceling the event causes the hand to not render.-
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
FieldsModifier and TypeFieldDescriptionprivate final floatprivate final InteractionHandprivate final floatprivate final MultiBufferSourceprivate final intprivate final floatprivate final PoseStackprivate final ItemStackprivate final float -
Constructor Summary
ConstructorsConstructorDescriptionRenderHandEvent(InteractionHand hand, PoseStack poseStack, MultiBufferSource multiBufferSource, int packedLight, float partialTicks, float interpolatedPitch, float swingProgress, float equipProgress, ItemStack stack) -
Method Summary
Methods inherited from class net.minecraftforge.eventbus.api.Event
getListenerList, getParentListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult, setup
-
Field Details
-
hand
-
poseStack
-
multiBufferSource
-
packedLight
private final int packedLight -
partialTicks
private final float partialTicks -
interpolatedPitch
private final float interpolatedPitch -
swingProgress
private final float swingProgress -
equipProgress
private final float equipProgress -
stack
-
-
Constructor Details
-
RenderHandEvent
public RenderHandEvent(InteractionHand hand, PoseStack poseStack, MultiBufferSource multiBufferSource, int packedLight, float partialTicks, float interpolatedPitch, float swingProgress, float equipProgress, @Nonnull ItemStack stack)
-
-
Method Details
-
getHand
-
getPoseStack
-
getMultiBufferSource
-
getPackedLight
public int getPackedLight() -
getPartialTicks
public float getPartialTicks() -
getInterpolatedPitch
public float getInterpolatedPitch()- Returns:
- The interpolated pitch of the player entity
-
getSwingProgress
public float getSwingProgress()- Returns:
- The swing progress of the hand being rendered
-
getEquipProgress
public float getEquipProgress()- Returns:
- The progress of the equip animation. 1.0 is fully equipped.
-
getItemStack
- Returns:
- The ItemStack to be rendered
-