Class SubmitCustomGeometryEvent
java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.client.event.SubmitCustomGeometryEvent
public final class SubmitCustomGeometryEvent
extends net.neoforged.bus.api.Event
This event can be used to submit custom geometry outside of
BlockEntityRenderers,
EntityRenderers and Particles.
Custom render state used by the submits must be extracted in ExtractLevelRenderStateEvent and
stored in the provided LevelRenderState
This event is fired between particle submission and rendering of opaque submits.
This event is not cancellable
This event is fired on the main NeoForge event bus, only on the logical client.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final LevelRenderStateprivate final PoseStackprivate final Iterable<? extends IRenderableSection> private final SubmitNodeCollector -
Constructor Summary
ConstructorsConstructorDescriptionSubmitCustomGeometryEvent(LevelRenderState levelRenderState, SubmitNodeCollector submitNodeCollector, PoseStack poseStack, Iterable<? extends IRenderableSection> renderableSections) -
Method Summary
Modifier and TypeMethodDescriptionReturns the level render state.Returns the pose stack to use for geometry submission.Iterable<? extends IRenderableSection> Returns an iterable of all visible sections.Returns the submit node collector to submit the geometry to.
-
Field Details
-
levelRenderState
-
submitNodeCollector
-
poseStack
-
renderableSections
-
-
Constructor Details
-
SubmitCustomGeometryEvent
@Internal public SubmitCustomGeometryEvent(LevelRenderState levelRenderState, SubmitNodeCollector submitNodeCollector, PoseStack poseStack, Iterable<? extends IRenderableSection> renderableSections)
-
-
Method Details
-
getLevelRenderState
Returns the level render state.- Returns:
- the level render state
-
getSubmitNodeCollector
Returns the submit node collector to submit the geometry to.- Returns:
- the submit node collector to submit the geometry to
-
getPoseStack
Returns the pose stack to use for geometry submission.- Returns:
- the pose stack to use for geometry submission
-
getRenderableSections
Returns an iterable of all visible sections.Calling
Iterable.forEach(Consumer)on the returned iterable allows the underlying renderer to optimize how it fetches the visible sections, and is recommended.
-