Class RenderBlockScreenEffectEvent
java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.client.event.RenderBlockScreenEffectEvent
- All Implemented Interfaces:
net.neoforged.bus.api.ICancellableEvent
public class RenderBlockScreenEffectEvent
extends net.neoforged.bus.api.Event
implements net.neoforged.bus.api.ICancellableEvent
Fired before a block texture will be overlaid on the player's view.
This event is cancellable, and does not
.
If this event is cancelled, then the overlay will not be rendered.invalid reference
have a result
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. -
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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.neoforged.bus.api.ICancellableEvent
isCanceled, setCanceled
-
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
-