Class RenderHighlightEvent.Block

java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.client.event.RenderHighlightEvent
net.neoforged.neoforge.client.event.RenderHighlightEvent.Block
All Implemented Interfaces:
net.neoforged.bus.api.ICancellableEvent
Enclosing class:
RenderHighlightEvent

public static class RenderHighlightEvent.Block extends RenderHighlightEvent implements net.neoforged.bus.api.ICancellableEvent
Fired before a block's selection highlight is rendered.

This event is cancellable, and does not

invalid reference
have a result
. If the event is cancelled, then the selection highlight will not be rendered.

This event is fired on the main Forge event bus, only on the logical client.

  • Field Details

    • forTranslucentBlocks

      private final boolean forTranslucentBlocks
  • Constructor Details

    • Block

      @Internal public Block(net.minecraft.client.renderer.LevelRenderer levelRenderer, net.minecraft.client.Camera camera, net.minecraft.world.phys.BlockHitResult target, net.minecraft.client.DeltaTracker deltaTracker, com.mojang.blaze3d.vertex.PoseStack poseStack, net.minecraft.client.renderer.MultiBufferSource bufferSource, boolean forTranslucentBlocks)
  • Method Details

    • getTarget

      public net.minecraft.world.phys.BlockHitResult getTarget()
      Returns the block hit result.
      Overrides:
      getTarget in class RenderHighlightEvent
      Returns:
      the block hit result
    • isForTranslucentBlocks

      public boolean isForTranslucentBlocks()
      Returns whether the event is fired for outlines on translucent or non-translucent blocks.
      Returns:
      whether the event is fired for outlines on translucent or non-translucent blocks