Package net.minecraft.world.server
Class ServerWorldLightManager
- java.lang.Object
-
- net.minecraft.world.lighting.WorldLightManager
-
- net.minecraft.world.server.ServerWorldLightManager
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,ILightListener
public class ServerWorldLightManager extends WorldLightManager implements java.lang.AutoCloseable
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
ServerWorldLightManager.Phase
-
Field Summary
Fields Modifier and Type Field Description private ChunkManager
chunkMap
private it.unimi.dsi.fastutil.objects.ObjectList<com.mojang.datafixers.util.Pair<ServerWorldLightManager.Phase,java.lang.Runnable>>
lightTasks
private static org.apache.logging.log4j.Logger
LOGGER
private java.util.concurrent.atomic.AtomicBoolean
scheduled
private ITaskExecutor<ChunkTaskPriorityQueueSorter.FunctionEntry<java.lang.Runnable>>
sorterMailbox
private DelegatedTaskExecutor<java.lang.Runnable>
taskMailbox
private int
taskPerBatch
-
Constructor Summary
Constructors Constructor Description ServerWorldLightManager(IChunkLightProvider p_i50701_1_, ChunkManager p_i50701_2_, boolean p_i50701_3_, DelegatedTaskExecutor<java.lang.Runnable> p_i50701_4_, ITaskExecutor<ChunkTaskPriorityQueueSorter.FunctionEntry<java.lang.Runnable>> p_i50701_5_)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
addTask(int p_215600_1_, int p_215600_2_, java.util.function.IntSupplier p_215600_3_, ServerWorldLightManager.Phase p_215600_4_, java.lang.Runnable p_215600_5_)
private void
addTask(int p_215586_1_, int p_215586_2_, ServerWorldLightManager.Phase p_215586_3_, java.lang.Runnable p_215586_4_)
void
checkBlock(BlockPos p_215568_1_)
void
close()
void
enableLightSources(ChunkPos p_215571_1_, boolean p_215571_2_)
java.util.concurrent.CompletableFuture<IChunk>
lightChunk(IChunk p_215593_1_, boolean p_215593_2_)
void
onBlockEmissionIncrease(BlockPos p_215573_1_, int p_215573_2_)
void
queueSectionData(LightType p_215574_1_, SectionPos p_215574_2_, NibbleArray p_215574_3_, boolean p_215574_4_)
void
retainData(ChunkPos p_223115_1_, boolean p_223115_2_)
private void
runUpdate()
int
runUpdates(int p_215575_1_, boolean p_215575_2_, boolean p_215575_3_)
void
setTaskPerBatch(int p_215598_1_)
void
tryScheduleUpdate()
protected void
updateChunkStatus(ChunkPos p_215581_1_)
void
updateSectionStatus(SectionPos p_215566_1_, boolean p_215566_2_)
-
Methods inherited from class net.minecraft.world.lighting.WorldLightManager
getDebugData, getLayerListener, getRawBrightness, hasLightWork
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.minecraft.world.lighting.ILightListener
updateSectionStatus
-
-
-
-
Field Detail
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER
-
taskMailbox
private final DelegatedTaskExecutor<java.lang.Runnable> taskMailbox
-
lightTasks
private final it.unimi.dsi.fastutil.objects.ObjectList<com.mojang.datafixers.util.Pair<ServerWorldLightManager.Phase,java.lang.Runnable>> lightTasks
-
chunkMap
private final ChunkManager chunkMap
-
sorterMailbox
private final ITaskExecutor<ChunkTaskPriorityQueueSorter.FunctionEntry<java.lang.Runnable>> sorterMailbox
-
taskPerBatch
private volatile int taskPerBatch
-
scheduled
private final java.util.concurrent.atomic.AtomicBoolean scheduled
-
-
Constructor Detail
-
ServerWorldLightManager
public ServerWorldLightManager(IChunkLightProvider p_i50701_1_, ChunkManager p_i50701_2_, boolean p_i50701_3_, DelegatedTaskExecutor<java.lang.Runnable> p_i50701_4_, ITaskExecutor<ChunkTaskPriorityQueueSorter.FunctionEntry<java.lang.Runnable>> p_i50701_5_)
-
-
Method Detail
-
close
public void close()
- Specified by:
close
in interfacejava.lang.AutoCloseable
-
runUpdates
public int runUpdates(int p_215575_1_, boolean p_215575_2_, boolean p_215575_3_)
- Overrides:
runUpdates
in classWorldLightManager
-
onBlockEmissionIncrease
public void onBlockEmissionIncrease(BlockPos p_215573_1_, int p_215573_2_)
- Overrides:
onBlockEmissionIncrease
in classWorldLightManager
-
checkBlock
public void checkBlock(BlockPos p_215568_1_)
- Overrides:
checkBlock
in classWorldLightManager
-
updateChunkStatus
protected void updateChunkStatus(ChunkPos p_215581_1_)
-
updateSectionStatus
public void updateSectionStatus(SectionPos p_215566_1_, boolean p_215566_2_)
- Specified by:
updateSectionStatus
in interfaceILightListener
- Overrides:
updateSectionStatus
in classWorldLightManager
-
enableLightSources
public void enableLightSources(ChunkPos p_215571_1_, boolean p_215571_2_)
- Overrides:
enableLightSources
in classWorldLightManager
-
queueSectionData
public void queueSectionData(LightType p_215574_1_, SectionPos p_215574_2_, @Nullable NibbleArray p_215574_3_, boolean p_215574_4_)
- Overrides:
queueSectionData
in classWorldLightManager
-
addTask
private void addTask(int p_215586_1_, int p_215586_2_, ServerWorldLightManager.Phase p_215586_3_, java.lang.Runnable p_215586_4_)
-
addTask
private void addTask(int p_215600_1_, int p_215600_2_, java.util.function.IntSupplier p_215600_3_, ServerWorldLightManager.Phase p_215600_4_, java.lang.Runnable p_215600_5_)
-
retainData
public void retainData(ChunkPos p_223115_1_, boolean p_223115_2_)
- Overrides:
retainData
in classWorldLightManager
-
lightChunk
public java.util.concurrent.CompletableFuture<IChunk> lightChunk(IChunk p_215593_1_, boolean p_215593_2_)
-
tryScheduleUpdate
public void tryScheduleUpdate()
-
runUpdate
private void runUpdate()
-
setTaskPerBatch
public void setTaskPerBatch(int p_215598_1_)
-
-