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
Fired before a hand is rendered in the first person view.
This event is cancellable, and does not have a result. If this event is cancelled, then the hand will not be rendered.
This event is fired on the main Forge event bus, only on the logical client.
- See Also:
-
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 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 net.minecraftforge.eventbus.api.Event
getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult
-
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
-