Package net.minecraftforge.client.event
Class RenderBlockScreenEffectEvent
java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.client.event.RenderBlockScreenEffectEvent
public class RenderBlockScreenEffectEvent
extends net.minecraftforge.eventbus.api.Event
Fired before a block texture will be overlaid on the player's view.
This event is cancellable, and does not have a result. If this event is cancelled, then the overlay will not be rendered.
This event is fired on the main Forge event bus, only on the logical client.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
The type of the block overlay to be rendered.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 BlockPos
private final BlockState
private final RenderBlockScreenEffectEvent.OverlayType
private final Player
private final PoseStack
-
Constructor Summary
ConstructorDescriptionRenderBlockScreenEffectEvent
(Player player, PoseStack poseStack, RenderBlockScreenEffectEvent.OverlayType type, BlockState block, BlockPos blockPos) -
Method Summary
Modifier and TypeMethodDescriptionReturns the position of the block which the overlay is gotten from.Returns the block which the overlay is gotten from.Returns the type of the overlay.Returns the player which the overlay will apply to.Returns the pose stack used for rendering.Methods inherited from class net.minecraftforge.eventbus.api.Event
getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult
-
Field Details
-
player
-
poseStack
-
overlayType
-
blockState
-
blockPos
-
-
Constructor Details
-
RenderBlockScreenEffectEvent
@Internal public RenderBlockScreenEffectEvent(Player player, PoseStack poseStack, RenderBlockScreenEffectEvent.OverlayType type, BlockState block, BlockPos blockPos)
-
-
Method Details
-
getPlayer
Returns the player which the overlay will apply to.- Returns:
- the player which the overlay will apply to
-
getPoseStack
Returns the pose stack used for rendering.- Returns:
- the pose stack used for rendering
-
getOverlayType
Returns the type of the overlay.- Returns:
- the type of the overlay
-
getBlockState
Returns the block which the overlay is gotten from.- Returns:
- the block which the overlay is gotten from
-
getBlockPos
Returns the position of the block which the overlay is gotten from.- Returns:
- the position of the block which the overlay is gotten from
-