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 Summary
Nested Classes -
Field Summary
FieldsModifier 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.LevelLightEngine
levelHeightAccessor, LIGHT_SECTION_PADDING -
Constructor Summary
ConstructorsConstructorDescriptionThreadedLevelLightEngine(LightChunkGetter p_9305_, ChunkMap p_9306_, boolean p_9307_, ProcessorMailbox<Runnable> p_9308_, ProcessorHandle<ChunkTaskPriorityQueueSorter.Message<Runnable>> p_9309_) -
Method Summary
Modifier 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_301257_, int p_300921_) Methods inherited from class net.minecraft.world.level.lighting.LevelLightEngine
getDebugData, getDebugSectionType, getLayerListener, getLightSectionCount, getMaxLightSection, getMinLightSection, getRawBrightness, hasLightWork, lightOnInSectionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.world.level.lighting.LightEventListener
updateSectionStatus
-
Field Details
-
DEFAULT_BATCH_SIZE
public static final int DEFAULT_BATCH_SIZE- See Also:
-
LOGGER
private static final org.slf4j.Logger LOGGER -
taskMailbox
-
lightTasks
private final it.unimi.dsi.fastutil.objects.ObjectList<com.mojang.datafixers.util.Pair<ThreadedLevelLightEngine.TaskType,Runnable>> lightTasks -
chunkMap
-
sorterMailbox
-
taskPerBatch
private final int taskPerBatch- See Also:
-
scheduled
-
-
Constructor Details
-
ThreadedLevelLightEngine
public ThreadedLevelLightEngine(LightChunkGetter p_9305_, ChunkMap p_9306_, boolean p_9307_, ProcessorMailbox<Runnable> p_9308_, ProcessorHandle<ChunkTaskPriorityQueueSorter.Message<Runnable>> p_9309_)
-
-
Method Details
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-
runLightUpdates
public int runLightUpdates()- Specified by:
runLightUpdatesin interfaceLightEventListener- Overrides:
runLightUpdatesin classLevelLightEngine
-
checkBlock
- Specified by:
checkBlockin interfaceLightEventListener- Overrides:
checkBlockin classLevelLightEngine
-
updateChunkStatus
-
updateSectionStatus
- Specified by:
updateSectionStatusin interfaceLightEventListener- Overrides:
updateSectionStatusin classLevelLightEngine
-
propagateLightSources
- Specified by:
propagateLightSourcesin interfaceLightEventListener- Overrides:
propagateLightSourcesin classLevelLightEngine
-
setLightEnabled
- Specified by:
setLightEnabledin interfaceLightEventListener- Overrides:
setLightEnabledin classLevelLightEngine
-
queueSectionData
public void queueSectionData(LightLayer p_285046_, SectionPos p_285496_, @Nullable DataLayer p_285495_) - Overrides:
queueSectionDatain classLevelLightEngine
-
addTask
private void addTask(int p_9313_, int p_9314_, ThreadedLevelLightEngine.TaskType p_9315_, Runnable p_9316_) -
addTask
private void addTask(int p_9318_, int p_9319_, IntSupplier p_9320_, ThreadedLevelLightEngine.TaskType p_9321_, Runnable p_9322_) -
retainData
- Overrides:
retainDatain classLevelLightEngine
-
initializeLight
-
lightChunk
-
tryScheduleUpdate
public void tryScheduleUpdate() -
runUpdate
private void runUpdate() -
waitForPendingTasks
-