Class RenderHighlightEvent

java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.client.event.RenderHighlightEvent
Direct Known Subclasses:
RenderHighlightEvent.Block, RenderHighlightEvent.Entity

public abstract class RenderHighlightEvent extends net.neoforged.bus.api.Event
Fired before a selection highlight is rendered. See the two subclasses to listen for blocks or entities.
See Also:
  • Field Details

    • levelRenderer

      private final LevelRenderer levelRenderer
    • camera

      private final Camera camera
    • target

      private final HitResult target
    • partialTick

      private final float partialTick
    • poseStack

      private final PoseStack poseStack
    • multiBufferSource

      private final MultiBufferSource multiBufferSource
  • Constructor Details

  • Method Details

    • getLevelRenderer

      public LevelRenderer getLevelRenderer()
      Returns the level renderer.
      Returns:
      the level renderer
    • getCamera

      public Camera getCamera()
      Returns the camera information.
      Returns:
      the camera information
    • getTarget

      public HitResult getTarget()
      Returns the hit result which triggered the selection highlight.
      Returns:
      the hit result which triggered the selection highlight
    • getPartialTick

      public float getPartialTick()
      Returns the partial tick.
      Returns:
      the partial tick
    • getPoseStack

      public PoseStack getPoseStack()
      Returns the pose stack used for rendering.
      Returns:
      the pose stack used for rendering
    • getMultiBufferSource

      public MultiBufferSource getMultiBufferSource()
      Returns the source of rendering buffers.
      Returns:
      the source of rendering buffers