Package net.minecraft.server.level
Class DistanceManager.FixedPlayerDistanceChunkTracker
java.lang.Object
net.minecraft.world.level.lighting.DynamicGraphMinFixedPoint
net.minecraft.server.level.ChunkTracker
net.minecraft.server.level.DistanceManager.FixedPlayerDistanceChunkTracker
- Direct Known Subclasses:
DistanceManager.PlayerTicketTracker
- Enclosing class:
DistanceManager
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final it.unimi.dsi.fastutil.longs.Long2ByteMapChunks that are at mostmaxDistancechunks away from the closest player.protected final intFields inherited from class net.minecraft.world.level.lighting.DynamicGraphMinFixedPoint
levelCount, SOURCE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected intgetLevel(long sectionPos) protected intgetLevelFromSource(long pos) private booleanhavePlayer(long chunkPos) protected voidonLevelChange(long chunkPos, int oldLevel, int newLevel) Called aftersetLevel(long, int)puts/removes chunk into/fromchunks.voidprotected voidsetLevel(long sectionPos, int level) Methods inherited from class net.minecraft.server.level.ChunkTracker
checkNeighborsAfterUpdate, computeLevelFromNeighbor, getComputedLevel, isSource, updateMethods inherited from class net.minecraft.world.level.lighting.DynamicGraphMinFixedPoint
checkEdge, checkNeighbor, checkNode, getQueueSize, hasWork, removeFromQueue, removeIf, runUpdates
-
Field Details
-
chunks
protected final it.unimi.dsi.fastutil.longs.Long2ByteMap chunksChunks that are at mostmaxDistancechunks away from the closest player. -
maxDistance
protected final int maxDistance
-
-
Constructor Details
-
FixedPlayerDistanceChunkTracker
protected FixedPlayerDistanceChunkTracker(int maxDistance)
-
-
Method Details
-
getLevel
protected int getLevel(long sectionPos) - Specified by:
getLevelin classDynamicGraphMinFixedPoint
-
setLevel
protected void setLevel(long sectionPos, int level) - Specified by:
setLevelin classDynamicGraphMinFixedPoint
-
onLevelChange
protected void onLevelChange(long chunkPos, int oldLevel, int newLevel) Called aftersetLevel(long, int)puts/removes chunk into/fromchunks.- Parameters:
oldLevel- Previous level of the chunk if it was smaller thanmaxDistance},invalid @link
{@link #maxDistance + 2otherwise.
-
getLevelFromSource
protected int getLevelFromSource(long pos) - Specified by:
getLevelFromSourcein classChunkTracker
-
havePlayer
private boolean havePlayer(long chunkPos) -
runAllUpdates
public void runAllUpdates()
-