net.minecraft.client.render

public class WorldRenderer

implements SynchronousResourceReloader, AutoCloseable

net.minecraft.client.renderer.LevelRenderer
net.minecraft.class_761
net.minecraft.client.render.WorldRenderer

Field summary

Modifier and TypeField
private static final Identifier
TRANSPARENCY_POST_CHAIN_ID
field_53900
TRANSPARENCY
private static final Identifier
ENTITY_OUTLINE_POST_CHAIN_ID
field_53901
ENTITY_OUTLINE
public static final int
SECTION_SIZE
field_32759
SECTION_SIZE
public static final int
HALF_SECTION_SIZE
field_34812
HALF_SECTION_SIZE
public static final int
NEARBY_SECTION_DISTANCE_IN_BLOCKS
field_54162
NEARBY_SECTION_DISTANCE
private static final int
MINIMUM_TRANSPARENT_SORT_COUNT
field_54163
MIN_TRANSPARENT_SORT_COUNT
private static final float
CHUNK_VISIBILITY_THRESHOLD
field_64450
field_64450
private final MinecraftClient
minecraft
field_4088
client
private final EntityRenderManager
entityRenderDispatcher
field_4109
entityRenderManager
private final BlockEntityRenderManager
blockEntityRenderDispatcher
field_27741
blockEntityRenderManager
private final BufferBuilderStorage
renderBuffers
field_20951
bufferBuilders
private SkyRendering
skyRenderer
field_53075
skyRendering
private final CloudRenderer
cloudRenderer
field_53076
cloudRenderer
private final WorldBorderRendering
worldBorderRenderer
field_53077
worldBorderRendering
private final WeatherRendering
weatherEffectRenderer
field_53078
weatherRendering
private final SubmittableBatch
particlesRenderState
field_62647
particleBatch
public final DebugRenderer
debugRenderer
field_63067
debugRenderer
public final GameTestDebugRenderer
gameTestBlockHighlightRenderer
field_63068
gameTestDebugRenderer
private ClientWorld
level
field_4085
world
private final ChunkRenderingDataPreparer
sectionOcclusionGraph
field_45615
chunkRenderingDataPreparer
private final it.unimi.dsi.fastutil.objects.ObjectArrayList<ChunkBuilder$BuiltChunk>
visibleSections
field_45616
builtChunks
private final it.unimi.dsi.fastutil.objects.ObjectArrayList<ChunkBuilder$BuiltChunk>
nearbyVisibleSections
field_54164
nearbyChunks
private BuiltChunkStorage
viewArea
field_4112
chunks
private int
ticks
field_4073
ticks
private final it.unimi.dsi.fastutil.ints.Int2ObjectMap<BlockBreakingInfo>
destroyingBlocks
field_4058
blockBreakingInfos
private final it.unimi.dsi.fastutil.longs.Long2ObjectMap<SortedSet<BlockBreakingInfo>>
destructionProgress
field_20950
blockBreakingProgressions
private Framebuffer
entityOutlineTarget
field_53080
entityOutlineFramebuffer
private final DefaultFramebufferSet
targets
field_53081
framebufferSet
private int
lastCameraSectionX
field_4084
cameraChunkX
private int
lastCameraSectionY
field_4105
cameraChunkY
private int
lastCameraSectionZ
field_4121
cameraChunkZ
private double
prevCamX
field_4069
lastCameraX
private double
prevCamY
field_4081
lastCameraY
private double
prevCamZ
field_4096
lastCameraZ
private double
prevCamRotX
field_4115
lastCameraPitch
private double
prevCamRotY
field_4064
lastCameraYaw
private ChunkBuilder
sectionRenderDispatcher
field_45614
chunkBuilder
private int
lastViewDistance
field_4062
viewDistance
private boolean
captureFrustum
field_62945
captureFrustum
private Frustum
capturedFrustum
field_4056
capturedFrustum
private BlockPos
lastTranslucentSortBlockPos
field_54160
lastTranslucencySortCameraPos
private int
translucencyResortIterationIndex
field_54161
chunkIndex
private final WorldRenderState
levelRenderState
field_61737
worldRenderState
private final OrderedRenderCommandQueueImpl
submitNodeStorage
field_61738
entityRenderCommandQueue
private final RenderDispatcher
featureRenderDispatcher
field_61739
entityRenderDispatcher
private GpuSampler
chunkLayerSampler
field_64218
terrainSampler
private final GizmoCollectorImpl
collectedGizmos
field_63574
gizmoCollector
private WorldRenderer$Gizmos
finalizedGizmos
field_64566
gizmos

Constructor summary

ModifierConstructor
public (MinecraftClient client, EntityRenderManager entityRenderManager, BlockEntityRenderManager blockEntityRenderManager, BufferBuilderStorage bufferBuilders, WorldRenderState worldRenderState, RenderDispatcher entityRenderDispatcher)

Method summary

Modifier and TypeMethod
public void
close()
public void
onResourceManagerReload(ResourceManager resourceManager)
method_14491(class_3300 arg0)
reload(ResourceManager arg0)
public void
initOutline()
method_3296()
loadEntityOutlinePostProcessor()
private PostEffectProcessor
getTransparencyChain()
method_62907()
getTransparencyPostEffectProcessor()
public void
doEntityOutline()
method_3254()
drawEntityOutlinesFramebuffer()
protected boolean
shouldShowEntityOutlines()
method_3270()
canDrawEntityOutlines()
public void
setLevel(ClientLevel level)
method_3244(class_638 arg0)
setWorld(ClientWorld world)
private void
clearVisibleSections()
method_64059()
clear()
public void
allChanged()
method_3279()
reload()
public void
resize(int width, int height)
method_3242(int arg0, int arg1)
onResized(int width, int height)
public String
getSectionStatistics()
method_3289()
getChunksDebugString()
public ChunkBuilder
getSectionRenderDispatcher()
method_34810()
getChunkBuilder()
public double
getTotalSections()
method_34811()
getChunkCount()
public double
getLastViewDistance()
method_34812()
getViewDistance()
public int
countRenderedSections()
method_3246()
getCompletedChunkCount()
public void
resetSampler()
method_76296()
refreshTerrainSampler()
public String
getEntityStatistics()
method_3272()
getEntitiesDebugString()
private void
cullTerrain(Camera camera, Frustum frustum, boolean spectator)
method_74752(class_4184 arg0, class_4604 arg1, boolean arg2)
updateCamera(Camera camera, Frustum frustum, boolean spectator)
public static Frustum
offsetFrustum(Frustum frustum)
method_52816(class_4604 arg0)
offsetFrustum(Frustum frustum)
private void
applyFrustum(Frustum frustum)
method_38551(class_4604 arg0)
applyFrustum(Frustum frustum)
public void
addRecentlyCompiledSection(SectionRenderDispatcher$RenderSection section)
method_38550(class_846$class_851 arg0)
addBuiltChunk(ChunkBuilder$BuiltChunk chunk)
private Frustum
prepareCullFrustum(org.joml.Matrix4f modelViewMatrix, org.joml.Matrix4f projectionMatrixForCulling, Vec3 cameraPos)
method_32133(org.joml.Matrix4f arg0, org.joml.Matrix4f arg1, class_243 arg2)
setupFrustum(org.joml.Matrix4f posMatrix, org.joml.Matrix4f projMatrix, Vec3d pos)
public void
renderLevel(GraphicsResourceAllocator resourceAllocator, DeltaTracker deltaTracker, boolean renderOutline, Camera camera, org.joml.Matrix4f modelViewMatrix, org.joml.Matrix4f projectionMatrix, org.joml.Matrix4f projectionMatrixForCulling, GpuBufferSlice terrainFog, org.joml.Vector4f fogColor, boolean shouldRenderSky)
method_22710(class_9922 arg0, class_9779 arg1, boolean arg2, class_4184 arg3, org.joml.Matrix4f arg4, org.joml.Matrix4f arg5, org.joml.Matrix4f arg6, GpuBufferSlice arg7, org.joml.Vector4f arg8, boolean arg9)
render(ObjectAllocator allocator, RenderTickCounter tickCounter, boolean renderBlockOutline, Camera camera, org.joml.Matrix4f positionMatrix, org.joml.Matrix4f basicProjectionMatrix, org.joml.Matrix4f projectionMatrix, GpuBufferSlice fogBuffer, org.joml.Vector4f fogColor, boolean renderSky)
private void
addMainPass(FrameGraphBuilder frame, Frustum frustum, org.joml.Matrix4f modelViewMatrix, GpuBufferSlice terrainFog, boolean renderOutline, LevelRenderState levelRenderState, DeltaTracker deltaTracker, ProfilerFiller profiler)
method_62202(class_9909 arg0, class_4604 arg1, org.joml.Matrix4f arg2, GpuBufferSlice arg3, boolean arg4, class_11658 arg5, class_9779 arg6, class_3695 arg7)
renderMain(FrameGraphBuilder frameGraphBuilder, Frustum frustum, org.joml.Matrix4f posMatrix, GpuBufferSlice fogBuffer, boolean renderBlockOutline, WorldRenderState state, RenderTickCounter tickCounter, Profiler profiler)
private void
addParticlesPass(FrameGraphBuilder frame, GpuBufferSlice fog)
method_62201(class_9909 arg0, GpuBufferSlice arg1)
renderParticles(FrameGraphBuilder frameGraphBuilder, GpuBufferSlice fogBuffer)
private void
addCloudsPass(FrameGraphBuilder frame, CloudStatus cloudsType, Vec3 cameraPosition, long gameTime, float partialTicks, int cloudColor, float cloudHeight)
method_62204(class_9909 arg0, class_4063 arg1, class_243 arg2, long arg3, float arg4, int arg5, float arg6)
renderClouds(FrameGraphBuilder frameGraphBuilder, CloudRenderMode mode, Vec3d cameraPos, long arg3, float arg4, int arg5, float arg6)
private void
addWeatherPass(FrameGraphBuilder frame, GpuBufferSlice fog)
method_62203(class_9909 arg0, GpuBufferSlice arg1)
renderWeather(FrameGraphBuilder frameGraphBuilder, GpuBufferSlice arg1)
private void
addLateDebugPass(FrameGraphBuilder frame, CameraRenderState camera, GpuBufferSlice fog, org.joml.Matrix4f modelViewMatrix)
method_62199(class_9909 arg0, class_12075 arg1, GpuBufferSlice arg2, org.joml.Matrix4f arg3)
renderLateDebug(FrameGraphBuilder frameGraphBuilder, CameraRenderState cameraRenderState, GpuBufferSlice fogBuffer, org.joml.Matrix4f arg3)
private void
extractVisibleEntities(Camera camera, Frustum frustum, DeltaTracker deltaTracker, LevelRenderState output)
method_72917(class_4184 arg0, class_4604 arg1, class_9779 arg2, class_11658 arg3)
fillEntityRenderStates(Camera camera, Frustum frustum, RenderTickCounter tickCounter, WorldRenderState renderStates)
private void
submitEntities(PoseStack poseStack, LevelRenderState levelRenderState, SubmitNodeCollector output)
method_72916(class_4587 arg0, class_11658 arg1, class_11659 arg2)
pushEntityRenders(MatrixStack matrices, WorldRenderState renderStates, OrderedRenderCommandQueue queue)
private void
extractVisibleBlockEntities(Camera camera, float deltaPartialTick, LevelRenderState levelRenderState)
method_74314(class_4184 arg0, float arg1, class_11658 arg2)
fillBlockEntityRenderStates(Camera camera, float tickProgress, WorldRenderState renderStates)
private void
submitBlockEntities(PoseStack poseStack, LevelRenderState levelRenderState, SubmitNodeStorage submitNodeStorage)
method_62208(class_4587 arg0, class_11658 arg1, class_11661 arg2)
renderBlockEntities(MatrixStack matrices, WorldRenderState renderStates, OrderedRenderCommandQueueImpl queue)
private void
extractBlockDestroyAnimation(Camera camera, LevelRenderState levelRenderState)
method_74922(class_4184 arg0, class_11658 arg1)
fillBlockBreakingProgressRenderState(Camera camera, WorldRenderState renderStates)
private void
renderBlockDestroyAnimation(PoseStack poseStack, MultiBufferSource$BufferSource bufferSource, LevelRenderState levelRenderState)
method_62206(class_4587 arg0, class_4597$class_4598 arg1, class_11658 arg2)
renderBlockDamage(MatrixStack matrices, VertexConsumerProvider$Immediate immediate, WorldRenderState renderStates)
private void
extractBlockOutline(Camera camera, LevelRenderState levelRenderState)
method_74923(class_4184 arg0, class_11658 arg1)
fillEntityOutlineRenderStates(Camera camera, WorldRenderState renderStates)
private void
renderBlockOutline(MultiBufferSource$BufferSource bufferSource, PoseStack poseStack, boolean onlyTranslucentBlocks, LevelRenderState levelRenderState)
method_62210(class_4597$class_4598 arg0, class_4587 arg1, boolean arg2, class_11658 arg3)
renderTargetBlockOutline(VertexConsumerProvider$Immediate immediate, MatrixStack matrices, boolean renderBlockOutline, WorldRenderState renderStates)
private void
checkPoseStack(PoseStack poseStack)
method_22979(class_4587 arg0)
checkEmpty(MatrixStack matrices)
private EntityRenderState
extractEntity(Entity entity, float partialTickTime)
method_72914(class_1297 arg0, float arg1)
getAndUpdateRenderState(Entity entity, float tickProgress)
private void
scheduleTranslucentSectionResort(Vec3 cameraPos)
method_62198(class_243 arg0)
translucencySort(Vec3d cameraPos)
private void
scheduleResort(SectionRenderDispatcher$RenderSection section, TranslucencyPointOfView pointOfView, Vec3 cameraPos, boolean blockPosChanged, boolean isNearby)
method_64060(class_846$class_851 arg0, class_10196 arg1, class_243 arg2, boolean arg3, boolean arg4)
scheduleChunkTranslucencySort(ChunkBuilder$BuiltChunk chunk, NormalizedRelativePos relativePos, Vec3d cameraPos, boolean needsUpdate, boolean ignoreCameraAlignment)
private SectionRenderState
prepareChunkRenders(org.joml.Matrix4fc modelViewMatrix, double camX, double camY, double camZ)
method_72157(org.joml.Matrix4fc arg0, double arg1, double arg2, double arg3)
renderBlockLayers(org.joml.Matrix4fc matrix, double cameraX, double cameraY, double cameraZ)
public void
endFrame()
method_71118()
rotate()
public void
captureFrustum()
method_35775()
captureFrustum()
public void
killFrustum()
method_35776()
killFrustum()
public void
tick(Camera camera)
method_3252(class_4184 arg0)
tick(Camera camera)
private void
removeBlockBreakingProgress()
method_74921()
updateBlockBreakingProgress()
private void
removeProgress(BlockDestructionProgress block)
method_22987(class_3191 arg0)
removeBlockBreakingInfo(BlockBreakingInfo info)
private void
addSkyPass(FrameGraphBuilder frame, Camera camera, GpuBufferSlice skyFog)
method_62200(class_9909 arg0, class_4184 arg1, GpuBufferSlice arg2)
renderSky(FrameGraphBuilder frameGraphBuilder, Camera camera, GpuBufferSlice fogBuffer)
private boolean
doesMobEffectBlockSky(Camera camera)
method_43788(class_4184 arg0)
hasBlindnessOrDarkness(Camera camera)
private void
compileSections(Camera camera)
method_3269(class_4184 arg0)
updateChunks(Camera camera)
private void
renderHitOutline(PoseStack poseStack, VertexConsumer builder, double camX, double camY, double camZ, BlockOutlineRenderState state, int color, float width)
method_22712(class_4587 arg0, class_4588 arg1, double arg2, double arg3, double arg4, class_12074 arg5, int arg6, float arg7)
drawBlockOutline(MatrixStack matrices, VertexConsumer vertexConsumer, double x, double y, double z, OutlineRenderState state, int color, float lineWidth)
public void
blockChanged(BlockGetter level, BlockPos pos, BlockState old, BlockState current, int updateFlags)
method_8570(class_1922 arg0, class_2338 arg1, class_2680 arg2, class_2680 arg3, int arg4)
updateBlock(BlockView world, BlockPos pos, BlockState oldState, BlockState newState, int flags)
private void
setBlockDirty(BlockPos pos, boolean playerChanged)
method_16037(class_2338 arg0, boolean arg1)
scheduleSectionRender(BlockPos pos, boolean important)
public void
setBlocksDirty(int x0, int y0, int z0, int x1, int y1, int z1)
method_18146(int arg0, int arg1, int arg2, int arg3, int arg4, int arg5)
scheduleBlockRenders(int minX, int minY, int minZ, int maxX, int maxY, int maxZ)
public void
setBlockDirty(BlockPos pos, BlockState oldState, BlockState newState)
method_21596(class_2338 arg0, class_2680 arg1, class_2680 arg2)
scheduleBlockRerenderIfNeeded(BlockPos pos, BlockState old, BlockState updated)
public void
setSectionDirtyWithNeighbors(int sectionX, int sectionY, int sectionZ)
method_18145(int arg0, int arg1, int arg2)
scheduleChunkRenders3x3x3(int x, int y, int z)
public void
setSectionRangeDirty(int minSectionX, int minSectionY, int minSectionZ, int maxSectionX, int maxSectionY, int maxSectionZ)
method_62219(int arg0, int arg1, int arg2, int arg3, int arg4, int arg5)
scheduleChunkRenders(int minX, int minY, int minZ, int maxX, int maxY, int maxZ)
public void
setSectionDirty(int sectionX, int sectionY, int sectionZ)
method_8571(int arg0, int arg1, int arg2)
scheduleChunkRender(int chunkX, int chunkY, int chunkZ)
private void
setSectionDirty(int sectionX, int sectionY, int sectionZ, boolean playerChanged)
method_3295(int arg0, int arg1, int arg2, boolean arg3)
scheduleChunkRender(int x, int y, int z, boolean important)
public void
onSectionBecomingNonEmpty(long sectionNode)
method_62908(long arg0)
onChunkUnload(long sectionPos)
public void
destroyBlockProgress(int id, BlockPos pos, int progress)
method_8569(int arg0, class_2338 arg1, int arg2)
setBlockBreakingInfo(int entityId, BlockPos pos, int stage)
public boolean
hasRenderedAllSections()
method_3281()
isTerrainRenderComplete()
public void
onChunkReadyToRender(ChunkPos pos)
method_65201(class_1923 arg0)
scheduleNeighborUpdates(ChunkPos chunkPos)
public void
needsUpdate()
method_3292()
scheduleTerrainUpdate()
public static int
getLightColor(BlockAndTintGetter level, BlockPos pos)
method_23794(class_1920 arg0, class_2338 arg1)
getLightmapCoordinates(BlockRenderView world, BlockPos pos)
public static int
getLightColor(LevelRenderer$BrightnessGetter brightnessGetter, BlockAndTintGetter level, BlockState state, BlockPos pos)
method_23793(class_761$class_10948 arg0, class_1920 arg1, class_2680 arg2, class_2338 arg3)
getLightmapCoordinates(WorldRenderer$BrightnessGetter brightnessGetter, BlockRenderView world, BlockState state, BlockPos pos)
public boolean
isSectionCompiledAndVisible(BlockPos blockPos)
method_40050(class_2338 arg0)
isRenderingReady(BlockPos pos)
public Framebuffer
entityOutlineTarget()
method_22990()
getEntityOutlinesFramebuffer()
public Framebuffer
getTranslucentTarget()
method_29360()
getTranslucentFramebuffer()
public Framebuffer
getItemEntityTarget()
method_29361()
getEntityFramebuffer()
public Framebuffer
getParticlesTarget()
method_29362()
getParticlesFramebuffer()
public Framebuffer
getWeatherTarget()
method_29363()
getWeatherFramebuffer()
public Framebuffer
getCloudsTarget()
method_29364()
getCloudsFramebuffer()
public it.unimi.dsi.fastutil.objects.ObjectArrayList<ChunkBuilder$BuiltChunk>
getVisibleSections()
method_62220()
getBuiltChunks()
public ChunkRenderingDataPreparer
getSectionOcclusionGraph()
method_62221()
getChunkRenderingDataPreparer()
public Frustum
getCapturedFrustum()
method_62222()
getCapturedFrustum()
public CloudRenderer
getCloudRenderer()
method_62196()
getCloudRenderer()
public GizmoDrawing$CollectorScope
collectPerFrameGizmos()
method_75414()
startDrawingGizmos()
private void
finalizeGizmoCollection()
method_76647()
collectGizmos()
private static SortedSet
lambda$destroyBlockProgress$8(long arg0)
method_22988(long arg0)
method_22988(long arg0)
private static void
lambda$addSkyPass$7(GpuBufferSlice arg0, SkyRenderState arg1, SkyRenderer arg2)
method_62215(GpuBufferSlice arg0, class_12076 arg1, class_9975 arg2)
method_62215(GpuBufferSlice arg0, SkyRenderState arg1, SkyRendering arg2)
private static void
lambda$prepareChunkRenders$6(int arg0, GpuBufferSlice[] arg1, RenderPass$UniformUploader arg2)
method_72156(int arg0, GpuBufferSlice[] arg1, RenderPass$class_10885 arg2)
method_72156(int arg0, GpuBufferSlice[] arg1, RenderPass$UniformUploader arg2)
private void
lambda$addLateDebugPass$5(GpuBufferSlice arg0, ResourceHandle arg1, CameraRenderState arg2, org.joml.Matrix4f arg3)
method_75413(GpuBufferSlice arg0, class_9925 arg1, class_12075 arg2, org.joml.Matrix4f arg3)
method_75413(GpuBufferSlice arg0, Handle arg1, CameraRenderState arg2, org.joml.Matrix4f arg3)
private void
lambda$addWeatherPass$4(GpuBufferSlice arg0, int arg1, float arg2)
method_62216(GpuBufferSlice arg0, int arg1, float arg2)
method_62216(GpuBufferSlice arg0, int arg1, float arg2)
private void
lambda$addCloudsPass$3(int arg0, CloudStatus arg1, float arg2, Vec3 arg3, long arg4, float arg5)
method_62205(int arg0, class_4063 arg1, float arg2, class_243 arg3, long arg4, float arg5)
method_62205(int arg0, CloudRenderMode arg1, float arg2, Vec3d arg3, long arg4, float arg5)
private void
lambda$addParticlesPass$2(GpuBufferSlice arg0, ResourceHandle arg1, ResourceHandle arg2)
method_62213(GpuBufferSlice arg0, class_9925 arg1, class_9925 arg2)
method_62213(GpuBufferSlice arg0, Handle arg1, Handle arg2)
private void
lambda$addMainPass$1(GpuBufferSlice arg0, LevelRenderState arg1, ProfilerFiller arg2, org.joml.Matrix4f arg3, ResourceHandle arg4, ResourceHandle arg5, boolean arg6, ResourceHandle arg7, ResourceHandle arg8)
method_62214(GpuBufferSlice arg0, class_11658 arg1, class_3695 arg2, org.joml.Matrix4f arg3, class_9925 arg4, class_9925 arg5, boolean arg6, class_9925 arg7, class_9925 arg8)
method_62214(GpuBufferSlice arg0, WorldRenderState arg1, Profiler arg2, org.joml.Matrix4f arg3, Handle arg4, Handle arg5, boolean arg6, Handle arg7, Handle arg8)
private void
lambda$renderLevel$0(org.joml.Vector4f arg0)
method_62218(org.joml.Vector4f arg0)
method_62218(org.joml.Vector4f arg0)