Package net.minecraftforge.client.event
Class RenderArmEvent
- java.lang.Object
-
- net.minecraftforge.eventbus.api.Event
-
- net.minecraftforge.client.event.RenderArmEvent
-
public class RenderArmEvent extends net.minecraftforge.eventbus.api.Event
This is a more targeted version ofRenderHandEvent
event that is fired specifically when a player's arm is being rendered in first person, and should be used instead if the desired outcome is just to replace the rendering of the arm, such as to make armor render on it or instead of it. This event is fired on theMinecraftForge.EVENT_BUS
Canceling the event causes the arm to not render.
-
-
Field Summary
Fields Modifier and Type Field Description private HandSide
arm
private IRenderTypeBuffer
multiBufferSource
private int
packedLight
private AbstractClientPlayerEntity
player
private MatrixStack
poseStack
-
Constructor Summary
Constructors Constructor Description RenderArmEvent(MatrixStack poseStack, IRenderTypeBuffer multiBufferSource, int packedLight, AbstractClientPlayerEntity player, HandSide arm)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HandSide
getArm()
IRenderTypeBuffer
getMultiBufferSource()
int
getPackedLight()
AbstractClientPlayerEntity
getPlayer()
MatrixStack
getPoseStack()
-
-
-
Field Detail
-
poseStack
private final MatrixStack poseStack
-
multiBufferSource
private final IRenderTypeBuffer multiBufferSource
-
packedLight
private final int packedLight
-
player
private final AbstractClientPlayerEntity player
-
arm
private final HandSide arm
-
-
Constructor Detail
-
RenderArmEvent
public RenderArmEvent(MatrixStack poseStack, IRenderTypeBuffer multiBufferSource, int packedLight, AbstractClientPlayerEntity player, HandSide arm)
-
-
Method Detail
-
getArm
public HandSide getArm()
- Returns:
- The arm being rendered.
-
getPoseStack
public MatrixStack getPoseStack()
-
getMultiBufferSource
public IRenderTypeBuffer getMultiBufferSource()
-
getPackedLight
public int getPackedLight()
-
getPlayer
public AbstractClientPlayerEntity getPlayer()
- Returns:
- the client player that is having their arm rendered. In general this will be the same as
Minecraft.player
.
-
-