@Environment(value=CLIENT)
public interface WorldRenderContext
WorldRenderer.render(MatrixStack, float, long, boolean, Camera, GameRenderer, LightmapTextureManager, Matrix4f)
.Modifier and Type | Interface and Description |
---|---|
static interface |
WorldRenderContext.BlockOutlineContext
Used in
BLOCK_OUTLINE to convey the parameters normally sent to
WorldRenderer.drawBlockOutline . |
Modifier and Type | Method and Description |
---|---|
boolean |
advancedTranslucency()
Test to know if "fabulous" graphics mode is enabled.
|
boolean |
blockOutlines() |
net.minecraft.client.render.Camera |
camera() |
@Nullable net.minecraft.client.render.VertexConsumerProvider |
consumers()
The
VertexConsumerProvider instance being used by the world renderer for most non-terrain renders. |
@Nullable net.minecraft.client.render.Frustum |
frustum()
View frustum, after it is initialized.
|
net.minecraft.client.render.GameRenderer |
gameRenderer() |
net.minecraft.client.render.LightmapTextureManager |
lightmapTextureManager() |
long |
limitTime() |
net.minecraft.client.util.math.MatrixStack |
matrixStack() |
net.minecraft.util.profiler.Profiler |
profiler()
Convenient access to game performance profiler.
|
net.minecraft.util.math.Matrix4f |
projectionMatrix() |
float |
tickDelta() |
net.minecraft.client.world.ClientWorld |
world()
Convenient access to {WorldRenderer.world}.
|
net.minecraft.client.render.WorldRenderer |
worldRenderer()
The world renderer instance doing the rendering and invoking the event.
|
net.minecraft.client.render.WorldRenderer worldRenderer()
net.minecraft.client.util.math.MatrixStack matrixStack()
float tickDelta()
long limitTime()
boolean blockOutlines()
net.minecraft.client.render.Camera camera()
net.minecraft.client.render.GameRenderer gameRenderer()
net.minecraft.client.render.LightmapTextureManager lightmapTextureManager()
net.minecraft.util.math.Matrix4f projectionMatrix()
net.minecraft.client.world.ClientWorld world()
net.minecraft.util.profiler.Profiler profiler()
boolean advancedTranslucency()
Use this for renders that need to render on top of all translucency to activate or deactivate different
event handlers to get optimal depth testing results. When fabulous is off, it may be better to render
during WorldRenderLastCallback
after clouds and weather are drawn. Conversely, when fabulous mode is on,
it may be better to draw during WorldRenderPostTranslucentCallback
, before the fabulous mode composite
shader runs, depending on which translucent buffer is being targeted.
true
when "fabulous" graphics mode is enabled.@Nullable @Nullable net.minecraft.client.render.VertexConsumerProvider consumers()
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.
This property is null
before WorldRenderEvents.BEFORE_ENTITIES
and after
WorldRenderEvents.BEFORE_DEBUG_RENDER
because the consumer buffers are not available before or
drawn after that in vanilla world rendering. Renders that cannot draw in one of the supported events
must be drawn directly to the frame buffer, preferably in WorldRenderEvents.LAST
to avoid being
overdrawn or cleared.
@Nullable @Nullable net.minecraft.client.render.Frustum frustum()
null
during
WorldRenderEvents.START
.