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:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Fired before a block's selection highlight is rendered.static class
Fired before an entity's selection highlight is rendered. -
Field Summary
Modifier and TypeFieldDescriptionprivate final Camera
private final LevelRenderer
private final MultiBufferSource
private final float
private final PoseStack
private final HitResult
-
Constructor Summary
ModifierConstructorDescriptionprotected
RenderHighlightEvent
(LevelRenderer levelRenderer, Camera camera, HitResult target, float partialTick, PoseStack poseStack, MultiBufferSource multiBufferSource) -
Method Summary
Modifier and TypeMethodDescriptionReturns the camera information.Returns the level renderer.Returns the source of rendering buffers.float
Returns the partial tick.Returns the pose stack used for rendering.Returns the hit result which triggered the selection highlight.
-
Field Details
-
levelRenderer
-
camera
-
target
-
partialTick
private final float partialTick -
poseStack
-
multiBufferSource
-
-
Constructor Details
-
RenderHighlightEvent
@Internal protected RenderHighlightEvent(LevelRenderer levelRenderer, Camera camera, HitResult target, float partialTick, PoseStack poseStack, MultiBufferSource multiBufferSource)
-
-
Method Details
-
getLevelRenderer
Returns the level renderer.- Returns:
- the level renderer
-
getCamera
Returns the camera information.- Returns:
- the camera information
-
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
Returns the pose stack used for rendering.- Returns:
- the pose stack used for rendering
-
getMultiBufferSource
Returns the source of rendering buffers.- Returns:
- the source of rendering buffers
-