Class ChunkRenderDispatcher
- java.lang.Object
-
- net.minecraft.client.renderer.chunk.ChunkRenderDispatcher
-
public class ChunkRenderDispatcher extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
ChunkRenderDispatcher.ChunkRender
(package private) static class
ChunkRenderDispatcher.ChunkTaskResult
static class
ChunkRenderDispatcher.CompiledChunk
-
Field Summary
Fields Modifier and Type Field Description private Vector3d
camera
private java.util.concurrent.Executor
executor
private RegionRenderCacheBuilder
fixedBuffers
private int
freeBufferCount
private java.util.Queue<RegionRenderCacheBuilder>
freeBuffers
private World
level
private static org.apache.logging.log4j.Logger
LOGGER
private DelegatedTaskExecutor<java.lang.Runnable>
mailbox
private WorldRenderer
renderer
private java.util.PriorityQueue<ChunkRenderDispatcher.ChunkRender.ChunkRenderTask>
toBatch
private int
toBatchCount
private java.util.Queue<java.lang.Runnable>
toUpload
-
Constructor Summary
Constructors Constructor Description ChunkRenderDispatcher(World p_i226020_1_, WorldRenderer p_i226020_2_, java.util.concurrent.Executor p_i226020_3_, boolean p_i226020_4_, RegionRenderCacheBuilder p_i226020_5_)
ChunkRenderDispatcher(World p_i226020_1_, WorldRenderer p_i226020_2_, java.util.concurrent.Executor p_i226020_3_, boolean p_i226020_4_, RegionRenderCacheBuilder p_i226020_5_, int countRenderBuilders)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
blockUntilClear()
private void
clearBatchQueue()
void
dispose()
private java.util.concurrent.CompletableFuture<java.lang.Void>
doUploadChunkLayer(BufferBuilder p_228904_1_, VertexBuffer p_228904_2_)
Vector3d
getCameraPosition()
java.lang.String
getStats()
boolean
isQueueEmpty()
void
rebuildChunkSync(ChunkRenderDispatcher.ChunkRender p_228902_1_)
private void
runTask()
void
schedule(ChunkRenderDispatcher.ChunkRender.ChunkRenderTask p_228900_1_)
void
setCamera(Vector3d p_217669_1_)
void
setLevel(World p_228895_1_)
boolean
uploadAllPendingUploads()
java.util.concurrent.CompletableFuture<java.lang.Void>
uploadChunkLayer(BufferBuilder p_228896_1_, VertexBuffer p_228896_2_)
-
-
-
Field Detail
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER
-
toBatch
private final java.util.PriorityQueue<ChunkRenderDispatcher.ChunkRender.ChunkRenderTask> toBatch
-
freeBuffers
private final java.util.Queue<RegionRenderCacheBuilder> freeBuffers
-
toUpload
private final java.util.Queue<java.lang.Runnable> toUpload
-
toBatchCount
private volatile int toBatchCount
-
freeBufferCount
private volatile int freeBufferCount
-
fixedBuffers
private final RegionRenderCacheBuilder fixedBuffers
-
mailbox
private final DelegatedTaskExecutor<java.lang.Runnable> mailbox
-
executor
private final java.util.concurrent.Executor executor
-
level
private World level
-
renderer
private final WorldRenderer renderer
-
camera
private Vector3d camera
-
-
Constructor Detail
-
ChunkRenderDispatcher
public ChunkRenderDispatcher(World p_i226020_1_, WorldRenderer p_i226020_2_, java.util.concurrent.Executor p_i226020_3_, boolean p_i226020_4_, RegionRenderCacheBuilder p_i226020_5_)
-
ChunkRenderDispatcher
public ChunkRenderDispatcher(World p_i226020_1_, WorldRenderer p_i226020_2_, java.util.concurrent.Executor p_i226020_3_, boolean p_i226020_4_, RegionRenderCacheBuilder p_i226020_5_, int countRenderBuilders)
-
-
Method Detail
-
setLevel
public void setLevel(World p_228895_1_)
-
runTask
private void runTask()
-
getStats
public java.lang.String getStats()
-
setCamera
public void setCamera(Vector3d p_217669_1_)
-
getCameraPosition
public Vector3d getCameraPosition()
-
uploadAllPendingUploads
public boolean uploadAllPendingUploads()
-
rebuildChunkSync
public void rebuildChunkSync(ChunkRenderDispatcher.ChunkRender p_228902_1_)
-
blockUntilClear
public void blockUntilClear()
-
schedule
public void schedule(ChunkRenderDispatcher.ChunkRender.ChunkRenderTask p_228900_1_)
-
uploadChunkLayer
public java.util.concurrent.CompletableFuture<java.lang.Void> uploadChunkLayer(BufferBuilder p_228896_1_, VertexBuffer p_228896_2_)
-
doUploadChunkLayer
private java.util.concurrent.CompletableFuture<java.lang.Void> doUploadChunkLayer(BufferBuilder p_228904_1_, VertexBuffer p_228904_2_)
-
clearBatchQueue
private void clearBatchQueue()
-
isQueueEmpty
public boolean isQueueEmpty()
-
dispose
public void dispose()
-
-