Package net.minecraftforge.client.event
Class RenderBlockOverlayEvent
- java.lang.Object
-
- net.minecraftforge.eventbus.api.Event
-
- net.minecraftforge.client.event.RenderBlockOverlayEvent
-
public class RenderBlockOverlayEvent extends net.minecraftforge.eventbus.api.Event
Called when a block's texture is going to be overlaid on the player's HUD. Cancel this event to prevent the overlay.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
RenderBlockOverlayEvent.OverlayType
-
Field Summary
Fields Modifier and Type Field Description private BlockState
blockForOverlay
private BlockPos
blockPos
private MatrixStack
mat
private RenderBlockOverlayEvent.OverlayType
overlayType
private PlayerEntity
player
-
Constructor Summary
Constructors Constructor Description RenderBlockOverlayEvent(PlayerEntity player, MatrixStack mat, RenderBlockOverlayEvent.OverlayType type, BlockState block, BlockPos blockPos)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BlockState
getBlockForOverlay()
If the overlay type is BLOCK, then this is the block which the overlay is getting it's icon fromBlockPos
getBlockPos()
MatrixStack
getMatrixStack()
RenderBlockOverlayEvent.OverlayType
getOverlayType()
The type of overlay to occurPlayerEntity
getPlayer()
The player which the overlay will apply to
-
-
-
Field Detail
-
player
private final PlayerEntity player
-
mat
private final MatrixStack mat
-
overlayType
private final RenderBlockOverlayEvent.OverlayType overlayType
-
blockForOverlay
private final BlockState blockForOverlay
-
blockPos
private final BlockPos blockPos
-
-
Constructor Detail
-
RenderBlockOverlayEvent
public RenderBlockOverlayEvent(PlayerEntity player, MatrixStack mat, RenderBlockOverlayEvent.OverlayType type, BlockState block, BlockPos blockPos)
-
-
Method Detail
-
getPlayer
public PlayerEntity getPlayer()
The player which the overlay will apply to
-
getMatrixStack
public MatrixStack getMatrixStack()
-
getOverlayType
public RenderBlockOverlayEvent.OverlayType getOverlayType()
The type of overlay to occur
-
getBlockForOverlay
public BlockState getBlockForOverlay()
If the overlay type is BLOCK, then this is the block which the overlay is getting it's icon from
-
getBlockPos
public BlockPos getBlockPos()
-
-