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.EventThis event is fired on theMinecraftForge.EVENT_BUSwhenever a hand is rendered in first person. Canceling the event causes the hand to not render.
-
-
Field Summary
Fields Modifier and Type Field Description private IRenderTypeBufferbuffersprivate floatequipProgressprivate Handhandprivate floatinterpolatedPitchprivate intlightprivate MatrixStackmatprivate floatpartialTicksprivate ItemStackstackprivate floatswingProgress
-
Constructor Summary
Constructors Constructor Description RenderHandEvent(Hand hand, MatrixStack mat, IRenderTypeBuffer buffers, int light, float partialTicks, float interpolatedPitch, float swingProgress, float equipProgress, ItemStack stack)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IRenderTypeBuffergetBuffers()floatgetEquipProgress()HandgetHand()floatgetInterpolatedPitch()ItemStackgetItemStack()intgetLight()MatrixStackgetMatrixStack()floatgetPartialTicks()floatgetSwingProgress()
-
-
-
Field Detail
-
hand
private final Hand hand
-
mat
private final MatrixStack mat
-
buffers
private final IRenderTypeBuffer buffers
-
light
private final int light
-
partialTicks
private final float partialTicks
-
interpolatedPitch
private final float interpolatedPitch
-
swingProgress
private final float swingProgress
-
equipProgress
private final float equipProgress
-
stack
@Nonnull private final ItemStack stack
-
-
Constructor Detail
-
RenderHandEvent
public RenderHandEvent(Hand hand, MatrixStack mat, IRenderTypeBuffer buffers, int light, float partialTicks, float interpolatedPitch, float swingProgress, float equipProgress, @Nonnull ItemStack stack)
-
-
Method Detail
-
getHand
public Hand getHand()
-
getMatrixStack
public MatrixStack getMatrixStack()
-
getBuffers
public IRenderTypeBuffer getBuffers()
-
getLight
public int getLight()
-
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
@Nonnull public ItemStack getItemStack()
- Returns:
- The ItemStack to be rendered
-
-