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 ChunkMapprivate 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 intFields inherited from class net.minecraft.world.level.lighting.LevelLightEngine
levelHeightAccessor, LIGHT_SECTION_PADDING, MAX_SOURCE_LEVEL -
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()voidenableLightSources(ChunkPos p_9336_, boolean p_9337_) lightChunk(ChunkAccess p_9354_, boolean p_9355_) voidonBlockEmissionIncrease(BlockPos p_9359_, int p_9360_) voidqueueSectionData(LightLayer p_9339_, SectionPos p_9340_, DataLayer p_9341_, boolean p_9342_) voidretainData(ChunkPos p_9370_, boolean p_9371_) private voidintrunUpdates(int p_9324_, boolean p_9325_, boolean p_9326_) voidsetTaskPerBatch(int p_9311_) voidprotected voidupdateChunkStatus(ChunkPos p_9331_) voidupdateSectionStatus(SectionPos p_9364_, boolean p_9365_) Methods inherited from class net.minecraft.world.level.lighting.LevelLightEngine
getDebugData, getLayerListener, getLightSectionCount, getMaxLightSection, getMinLightSection, getRawBrightness, hasLightWorkMethods 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
-
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 volatile int taskPerBatch -
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
-
runUpdates
public int runUpdates(int p_9324_, boolean p_9325_, boolean p_9326_) - Specified by:
runUpdatesin interfaceLightEventListener- Overrides:
runUpdatesin classLevelLightEngine
-
onBlockEmissionIncrease
- Specified by:
onBlockEmissionIncreasein interfaceLightEventListener- Overrides:
onBlockEmissionIncreasein classLevelLightEngine
-
checkBlock
- Specified by:
checkBlockin interfaceLightEventListener- Overrides:
checkBlockin classLevelLightEngine
-
updateChunkStatus
-
updateSectionStatus
- Specified by:
updateSectionStatusin interfaceLightEventListener- Overrides:
updateSectionStatusin classLevelLightEngine
-
enableLightSources
- Specified by:
enableLightSourcesin interfaceLightEventListener- Overrides:
enableLightSourcesin classLevelLightEngine
-
queueSectionData
public void queueSectionData(LightLayer p_9339_, SectionPos p_9340_, @Nullable DataLayer p_9341_, boolean p_9342_) - 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
-
lightChunk
-
tryScheduleUpdate
public void tryScheduleUpdate() -
runUpdate
private void runUpdate() -
setTaskPerBatch
public void setTaskPerBatch(int p_9311_)
-