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. 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.

  • Field Details

  • Constructor Details

  • Method Details

    • getPlayer

      public Player getPlayer()
      Returns the player which the overlay will apply to.
      Returns:
      the player which the overlay will apply to
    • getPoseStack

      public 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 BlockState getBlockState()
      Returns the block which the overlay is gotten from.
      Returns:
      the block which the overlay is gotten from
    • getBlockPos

      public 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
    • getMaterials

      public MaterialSet getMaterials()
      Returns the materials used in rendering.
      Returns:
      the materials used in rendering
    • getBufferSource

      public MultiBufferSource getBufferSource()
      Returns the buffer source used in rendering.
      Returns:
      the buffer source used in rendering