Interface WorldRenderContext

All Superinterfaces:
AbstractWorldRenderContext, WorldTerrainRenderContext

@NonExtendable public interface WorldRenderContext extends WorldTerrainRenderContext
  • Method Summary

    Modifier and Type
    Method
    Description
    net.minecraft.client.renderer.SubmitNodeCollector
     
    net.minecraft.client.renderer.MultiBufferSource
    The VertexConsumerProvider instance being used by the world renderer for most non-terrain renders.
    com.mojang.blaze3d.vertex.PoseStack
     

    Methods inherited from interface net.fabricmc.fabric.api.client.rendering.v1.world.AbstractWorldRenderContext

    gameRenderer, worldRenderer, worldState

    Methods inherited from interface net.fabricmc.fabric.api.client.rendering.v1.world.WorldTerrainRenderContext

    sectionState
  • Method Details

    • commandQueue

      net.minecraft.client.renderer.SubmitNodeCollector commandQueue()
    • matrices

      com.mojang.blaze3d.vertex.PoseStack matrices()
    • consumers

      net.minecraft.client.renderer.MultiBufferSource consumers()
      The VertexConsumerProvider instance being used by the world renderer for most non-terrain renders. Generally this will be better for most use cases because quads for the same layer can be buffered incrementally and then drawn all at once by the world renderer.

      IMPORTANT - all vertex coordinates sent to consumers should be relative to the camera to be consistent with other quads emitted by the world renderer and other mods. If this isn't possible, caller should use a separate "immediate" instance.

      Renders that cannot draw in one of the supported events must be drawn directly to the frame buffer, preferably in WorldRenderEvents.END_MAIN to avoid being overdrawn or cleared.