Package net.minecraft.server.level
Class ThreadedLevelLightEngine
java.lang.Object
net.minecraft.world.level.lighting.LevelLightEngine
net.minecraft.server.level.ThreadedLevelLightEngine
- All Implemented Interfaces:
- AutoCloseable,- LightEventListener
- 
Nested Class SummaryNested Classes
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final ChunkMapstatic final intprivate final it.unimi.dsi.fastutil.objects.ObjectList<com.mojang.datafixers.util.Pair<ThreadedLevelLightEngine.TaskType,Runnable>> private static final org.slf4j.Loggerprivate final AtomicBooleanprivate final ProcessorHandle<ChunkTaskPriorityQueueSorter.Message<Runnable>>private final ProcessorMailbox<Runnable>private final intFields inherited from class net.minecraft.world.level.lighting.LevelLightEnginelevelHeightAccessor, LIGHT_SECTION_PADDING
- 
Constructor SummaryConstructorsConstructorDescriptionThreadedLevelLightEngine(LightChunkGetter p_9305_, ChunkMap p_9306_, boolean p_9307_, ProcessorMailbox<Runnable> p_9308_, ProcessorHandle<ChunkTaskPriorityQueueSorter.Message<Runnable>> p_9309_) 
- 
Method SummaryModifier and TypeMethodDescriptionprivate voidaddTask(int p_9318_, int p_9319_, IntSupplier p_9320_, ThreadedLevelLightEngine.TaskType p_9321_, Runnable p_9322_) private voidaddTask(int p_9313_, int p_9314_, ThreadedLevelLightEngine.TaskType p_9315_, Runnable p_9316_) voidcheckBlock(BlockPos p_9357_) voidclose()initializeLight(ChunkAccess p_285128_, boolean p_285441_) lightChunk(ChunkAccess p_9354_, boolean p_9355_) voidpropagateLightSources(ChunkPos p_285029_) voidqueueSectionData(LightLayer p_285046_, SectionPos p_285496_, DataLayer p_285495_) voidretainData(ChunkPos p_9370_, boolean p_9371_) intprivate voidvoidsetLightEnabled(ChunkPos p_9336_, boolean p_9337_) voidprotected voidupdateChunkStatus(ChunkPos p_9331_) voidupdateSectionStatus(SectionPos p_9364_, boolean p_9365_) waitForPendingTasks(int p_297330_, int p_298866_) Methods inherited from class net.minecraft.world.level.lighting.LevelLightEnginegetDebugData, getDebugSectionType, getLayerListener, getLightSectionCount, getMaxLightSection, getMinLightSection, getRawBrightness, hasLightWork, lightOnInSectionMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.world.level.lighting.LightEventListenerupdateSectionStatus
- 
Field Details- 
DEFAULT_BATCH_SIZEpublic static final int DEFAULT_BATCH_SIZE- See Also:
 
- 
LOGGERprivate static final org.slf4j.Logger LOGGER
- 
taskMailbox
- 
lightTasksprivate final it.unimi.dsi.fastutil.objects.ObjectList<com.mojang.datafixers.util.Pair<ThreadedLevelLightEngine.TaskType,Runnable>> lightTasks
- 
chunkMap
- 
sorterMailbox
- 
taskPerBatchprivate final int taskPerBatch- See Also:
 
- 
scheduled
 
- 
- 
Constructor Details- 
ThreadedLevelLightEnginepublic ThreadedLevelLightEngine(LightChunkGetter p_9305_, ChunkMap p_9306_, boolean p_9307_, ProcessorMailbox<Runnable> p_9308_, ProcessorHandle<ChunkTaskPriorityQueueSorter.Message<Runnable>> p_9309_) 
 
- 
- 
Method Details- 
closepublic void close()- Specified by:
- closein interface- AutoCloseable
 
- 
runLightUpdatespublic int runLightUpdates()- Specified by:
- runLightUpdatesin interface- LightEventListener
- Overrides:
- runLightUpdatesin class- LevelLightEngine
 
- 
checkBlock- Specified by:
- checkBlockin interface- LightEventListener
- Overrides:
- checkBlockin class- LevelLightEngine
 
- 
updateChunkStatus
- 
updateSectionStatus- Specified by:
- updateSectionStatusin interface- LightEventListener
- Overrides:
- updateSectionStatusin class- LevelLightEngine
 
- 
propagateLightSources- Specified by:
- propagateLightSourcesin interface- LightEventListener
- Overrides:
- propagateLightSourcesin class- LevelLightEngine
 
- 
setLightEnabled- Specified by:
- setLightEnabledin interface- LightEventListener
- Overrides:
- setLightEnabledin class- LevelLightEngine
 
- 
queueSectionDatapublic void queueSectionData(LightLayer p_285046_, SectionPos p_285496_, @Nullable DataLayer p_285495_) - Overrides:
- queueSectionDatain class- LevelLightEngine
 
- 
addTaskprivate void addTask(int p_9313_, int p_9314_, ThreadedLevelLightEngine.TaskType p_9315_, Runnable p_9316_) 
- 
addTaskprivate void addTask(int p_9318_, int p_9319_, IntSupplier p_9320_, ThreadedLevelLightEngine.TaskType p_9321_, Runnable p_9322_) 
- 
retainData- Overrides:
- retainDatain class- LevelLightEngine
 
- 
initializeLight
- 
lightChunk
- 
tryScheduleUpdatepublic void tryScheduleUpdate()
- 
runUpdateprivate void runUpdate()
- 
waitForPendingTasks
 
-