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 mostchunks away from the closest player.invalid reference
#rangeprotected final intFields inherited from class net.minecraft.world.level.lighting.DynamicGraphMinFixedPoint
levelCount, SOURCE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voiddumpChunks(String filename) protected intgetLevel(long sectionPos) protected intgetLevelFromSource(long pos) private booleanhavePlayer(long chunkPos) protected voidonLevelChange(long chunkPos, int oldLevel, int newLevel) Called afterputs/removes chunk into/frominvalid reference
PlayerChunkTracker#setLevel(long, int).invalid reference
#chunksInRangevoidprotected 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 mostchunks away from the closest player.invalid reference
#range -
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 afterputs/removes chunk into/frominvalid reference
PlayerChunkTracker#setLevel(long, int).invalid reference
#chunksInRange- Parameters:
oldLevel- Previous level of the chunk if it was smaller thanrange},invalid @link
{@link #range + 2otherwise.
-
getLevelFromSource
protected int getLevelFromSource(long pos) - Specified by:
getLevelFromSourcein classChunkTracker
-
havePlayer
private boolean havePlayer(long chunkPos) -
runAllUpdates
public void runAllUpdates() -
dumpChunks
-