WorldRenderEvents

public final class WorldRenderEvents

Mods should use these events to introduce custom rendering during render without adding complicated and conflict-prone injections there. Using these events also enables 3rd-party renderers that make large-scale changes to rendering maintain compatibility by calling any broken event invokers directly.

The order of events each frame is as follows:

  • START
  • AFTER_SETUP
  • BEFORE_ENTITIES
  • AFTER_ENTITIES
  • BEFORE_BLOCK_OUTLINE
  • BLOCK_OUTLINE (If not cancelled in BEFORE_BLOCK_OUTLINE)
  • BEFORE_DEBUG_RENDER
  • AFTER_TRANSLUCENT
  • LAST
  • END

These events are not dependent on the Fabric rendering API or Indigo but work when those are present.

Types

AfterEntities
Link copied to clipboard
public interface AfterEntities
AfterSetup
Link copied to clipboard
public interface AfterSetup
AfterTranslucent
Link copied to clipboard
public interface AfterTranslucent
BeforeBlockOutline
Link copied to clipboard
public interface BeforeBlockOutline
BeforeEntities
Link copied to clipboard
public interface BeforeEntities
BlockOutline
Link copied to clipboard
public interface BlockOutline
DebugRender
Link copied to clipboard
public interface DebugRender
End
Link copied to clipboard
public interface End
Last
Link copied to clipboard
public interface Last
Start
Link copied to clipboard
public interface Start

Properties

AFTER_ENTITIES
Link copied to clipboard
public final static Event<WorldRenderEvents.AfterEntitiesAFTER_ENTITIES
Called after entities are rendered and solid entity layershave been drawn to the main frame buffer target, beforeblock entity rendering begins.
AFTER_SETUP
Link copied to clipboard
public final static Event<WorldRenderEvents.AfterSetupAFTER_SETUP
Called after view Frustum is computed and all render chunks to be rendered areidentified and rebuilt but before chunks are uploaded to GPU.
AFTER_TRANSLUCENT
Link copied to clipboard
public final static Event<WorldRenderEvents.AfterTranslucentAFTER_TRANSLUCENT
Called after entity, terrain, and particle translucent layers have beendrawn to the framebuffer but before translucency combine has happenedin fabulous mode.
BEFORE_BLOCK_OUTLINE
Link copied to clipboard
public final static Event<WorldRenderEvents.BeforeBlockOutlineBEFORE_BLOCK_OUTLINE
Called before default block outline rendering and before checks aredone to determine if it should happen.
BEFORE_DEBUG_RENDER
Link copied to clipboard
public final static Event<WorldRenderEvents.DebugRenderBEFORE_DEBUG_RENDER
Called before vanilla debug renderers are output to the framebuffer.This happens very soon after entities, block breaking and most othernon-translucent renders but before translucency is drawn.
BEFORE_ENTITIES
Link copied to clipboard
public final static Event<WorldRenderEvents.BeforeEntitiesBEFORE_ENTITIES
Called after the Solid, Cutout and Cutout Mipped terrain layers have been output to the framebuffer.
BLOCK_OUTLINE
Link copied to clipboard
public final static Event<WorldRenderEvents.BlockOutlineBLOCK_OUTLINE
Called after block outline render checks are made and before thedefault block outline render runs.
END
Link copied to clipboard
public final static Event<WorldRenderEvents.EndEND
Called after all world rendering is complete and changes to GL state are unwound.
LAST
Link copied to clipboard
public final static Event<WorldRenderEvents.LastLAST
Called after all framebuffer writes are complete but before all worldrendering is torn down.
START
Link copied to clipboard
public final static Event<WorldRenderEvents.StartSTART
Called before world rendering executes.

Sources

jvm source
Link copied to clipboard