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 Details

  • Constructor Details

  • Method Details

    • getLevelRenderState

      public LevelRenderState getLevelRenderState()
      Returns the level render state.
      Returns:
      the level render state
    • getSubmitNodeCollector

      public SubmitNodeCollector getSubmitNodeCollector()
      Returns the submit node collector to submit the geometry to.
      Returns:
      the submit node collector to submit the geometry to
    • getPoseStack

      public PoseStack getPoseStack()
      Returns the pose stack to use for geometry submission.
      Returns:
      the pose stack to use for geometry submission
    • getRenderableSections

      public Iterable<? extends IRenderableSection> 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.