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
Nested ClassesModifier and TypeClassDescriptionstatic enum
The type of the block overlay to be rendered. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final net.minecraft.core.BlockPos
private final net.minecraft.world.level.block.state.BlockState
private final RenderBlockScreenEffectEvent.OverlayType
private final net.minecraft.world.entity.player.Player
private final com.mojang.blaze3d.vertex.PoseStack
-
Constructor Summary
ConstructorsConstructorDescriptionRenderBlockScreenEffectEvent
(net.minecraft.world.entity.player.Player player, com.mojang.blaze3d.vertex.PoseStack poseStack, RenderBlockScreenEffectEvent.OverlayType type, net.minecraft.world.level.block.state.BlockState block, net.minecraft.core.BlockPos blockPos) -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.core.BlockPos
Returns the position of the block which the overlay is gotten from.net.minecraft.world.level.block.state.BlockState
Returns the block which the overlay is gotten from.Returns the type of the overlay.net.minecraft.world.entity.player.Player
Returns the player which the overlay will apply to.com.mojang.blaze3d.vertex.PoseStack
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
private final net.minecraft.world.entity.player.Player player -
poseStack
private final com.mojang.blaze3d.vertex.PoseStack poseStack -
overlayType
-
blockState
private final net.minecraft.world.level.block.state.BlockState blockState -
blockPos
private final net.minecraft.core.BlockPos blockPos
-
-
Constructor Details
-
RenderBlockScreenEffectEvent
@Internal public RenderBlockScreenEffectEvent(net.minecraft.world.entity.player.Player player, com.mojang.blaze3d.vertex.PoseStack poseStack, RenderBlockScreenEffectEvent.OverlayType type, net.minecraft.world.level.block.state.BlockState block, net.minecraft.core.BlockPos blockPos)
-
-
Method Details
-
getPlayer
public net.minecraft.world.entity.player.Player getPlayer()Returns the player which the overlay will apply to.- Returns:
- the player which the overlay will apply to
-
getPoseStack
public com.mojang.blaze3d.vertex.PoseStack 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
public net.minecraft.world.level.block.state.BlockState getBlockState()Returns the block which the overlay is gotten from.- Returns:
- the block which the overlay is gotten from
-
getBlockPos
public net.minecraft.core.BlockPos 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
-