Class RenderLevelStageEvent

java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.client.event.RenderLevelStageEvent

public class RenderLevelStageEvent extends net.minecraftforge.eventbus.api.Event
Fires at various times during LevelRenderer.renderLevel. Check getStage() to render during the appropriate time for your use case.

This event is not cancellable, and does not have a result.

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

  • Field Details

    • stage

      private final RenderLevelStageEvent.Stage stage
    • levelRenderer

      private final LevelRenderer levelRenderer
    • poseStack

      private final PoseStack poseStack
    • projectionMatrix

      private final org.joml.Matrix4f projectionMatrix
    • renderTick

      private final int renderTick
    • partialTick

      private final float partialTick
    • camera

      private final Camera camera
    • frustum

      private final Frustum frustum
  • Constructor Details

  • Method Details

    • getStage

      public RenderLevelStageEvent.Stage getStage()
      Returns the current stage that is being rendered. Check this before doing rendering to ensure that rendering happens at the appropriate time..
      Returns:
      the current stage that is being rendered. Check this before doing rendering to ensure that rendering happens at the appropriate time.
    • getLevelRenderer

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

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

      public org.joml.Matrix4f getProjectionMatrix()
      Returns the projection matrix.
      Returns:
      the projection matrix
    • getRenderTick

      public int getRenderTick()
      Returns the current "ticks" value in the level renderer.
      Returns:
      the current "ticks" value in the level renderer
    • getPartialTick

      public float getPartialTick()
      Returns the current partialTick value used for rendering.
      Returns:
      the current partialTick value used for rendering
    • getCamera

      public Camera getCamera()
      Returns the camera.
      Returns:
      the camera
    • getFrustum

      public Frustum getFrustum()
      Returns the frustum.
      Returns:
      the frustum