Package net.minecraft.server.world
Class ServerLightingProvider
java.lang.Object
net.minecraft.world.chunk.light.LightingProvider
net.minecraft.server.world.ServerLightingProvider
- All Implemented Interfaces:
AutoCloseable,LightingView
public class ServerLightingProvider extends LightingProvider implements AutoCloseable
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static classServerLightingProvider.Stage -
Field Summary
Fields Modifier and Type Field Description private ThreadedAnvilChunkStoragechunkStorageprivate MessageListener<ChunkTaskPrioritySystem.Task<Runnable>>executorprivate static LoggerLOGGERprivate ObjectList<com.mojang.datafixers.util.Pair<ServerLightingProvider.Stage,Runnable>>pendingTasksprivate TaskExecutor<Runnable>processorprivate inttaskBatchSizeprivate AtomicBooleantickingFields inherited from class net.minecraft.world.chunk.light.LightingProvider
field_27339 -
Constructor Summary
Constructors Constructor Description ServerLightingProvider(ChunkProvider chunkProvider, ThreadedAnvilChunkStorage chunkStorage, boolean hasBlockLight, TaskExecutor<Runnable> processor, MessageListener<ChunkTaskPrioritySystem.Task<Runnable>> executor) -
Method Summary
Modifier and Type Method Description voidaddLightSource(BlockPos pos, int level)voidcheckBlock(BlockPos pos)voidclose()intdoLightUpdates(int maxUpdateCount, boolean doSkylight, boolean skipEdgeLightPropagation)private voidenqueue(int x, int z, IntSupplier completedLevelSupplier, ServerLightingProvider.Stage stage, Runnable task)private voidenqueue(int x, int z, ServerLightingProvider.Stage stage, Runnable task)voidenqueueSectionData(LightType lightType, ChunkSectionPos pos, ChunkNibbleArray nibbles, boolean bool)CompletableFuture<Chunk>light(Chunk chunk, boolean excludeBlocks)private voidrunTasks()voidsetColumnEnabled(ChunkPos pos, boolean lightEnabled)voidsetRetainData(ChunkPos pos, boolean retainData)voidsetSectionStatus(ChunkSectionPos pos, boolean notReady)voidsetTaskBatchSize(int taskBatchSize)voidtick()protected voidupdateChunkStatus(ChunkPos pos)Methods inherited from class net.minecraft.world.chunk.light.LightingProvider
displaySectionLevel, get, getLight, hasUpdates, method_31928, method_31929, method_31930Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.world.chunk.light.LightingView
setSectionStatus
-
Field Details
-
LOGGER
-
processor
-
pendingTasks
private final ObjectList<com.mojang.datafixers.util.Pair<ServerLightingProvider.Stage,Runnable>> pendingTasks -
chunkStorage
-
executor
-
taskBatchSize
private volatile int taskBatchSize -
ticking
-
-
Constructor Details
-
ServerLightingProvider
public ServerLightingProvider(ChunkProvider chunkProvider, ThreadedAnvilChunkStorage chunkStorage, boolean hasBlockLight, TaskExecutor<Runnable> processor, MessageListener<ChunkTaskPrioritySystem.Task<Runnable>> executor)
-
-
Method Details
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-
doLightUpdates
public int doLightUpdates(int maxUpdateCount, boolean doSkylight, boolean skipEdgeLightPropagation)- Overrides:
doLightUpdatesin classLightingProvider
-
addLightSource
- Overrides:
addLightSourcein classLightingProvider
-
checkBlock
- Overrides:
checkBlockin classLightingProvider
-
updateChunkStatus
-
setSectionStatus
- Specified by:
setSectionStatusin interfaceLightingView- Overrides:
setSectionStatusin classLightingProvider
-
setColumnEnabled
- Overrides:
setColumnEnabledin classLightingProvider
-
enqueueSectionData
public void enqueueSectionData(LightType lightType, ChunkSectionPos pos, @Nullable ChunkNibbleArray nibbles, boolean bool)- Overrides:
enqueueSectionDatain classLightingProvider
-
enqueue
-
enqueue
private void enqueue(int x, int z, IntSupplier completedLevelSupplier, ServerLightingProvider.Stage stage, Runnable task) -
setRetainData
- Overrides:
setRetainDatain classLightingProvider
-
light
-
tick
public void tick() -
runTasks
private void runTasks() -
setTaskBatchSize
public void setTaskBatchSize(int taskBatchSize)
-