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.Long2ByteMap
Chunks that are at mostinvalid reference
#range
protected final int
Fields inherited from class net.minecraft.world.level.lighting.DynamicGraphMinFixedPoint
levelCount, SOURCE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
dumpChunks
(String pFilename) protected int
getLevel
(long pSectionPos) protected int
getLevelFromSource
(long pPos) private boolean
havePlayer
(long pChunkPos) protected void
onLevelChange
(long pChunkPos, int pOldLevel, int pNewLevel) Called afterinvalid reference
PlayerChunkTracker#setLevel(long, int)
invalid reference
#chunksInRange
void
protected void
setLevel
(long pSectionPos, int pLevel) Methods inherited from class net.minecraft.server.level.ChunkTracker
checkNeighborsAfterUpdate, computeLevelFromNeighbor, getComputedLevel, isSource, update
Methods 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 mostinvalid reference
#range
-
maxDistance
protected final int maxDistance
-
-
Constructor Details
-
FixedPlayerDistanceChunkTracker
protected FixedPlayerDistanceChunkTracker(int pMaxDistance)
-
-
Method Details
-
getLevel
protected int getLevel(long pSectionPos) - Specified by:
getLevel
in classDynamicGraphMinFixedPoint
-
setLevel
protected void setLevel(long pSectionPos, int pLevel) - Specified by:
setLevel
in classDynamicGraphMinFixedPoint
-
onLevelChange
protected void onLevelChange(long pChunkPos, int pOldLevel, int pNewLevel) Called afterinvalid reference
PlayerChunkTracker#setLevel(long, int)
invalid reference
#chunksInRange
- Parameters:
pOldLevel
- Previous level of the chunk if it was smaller thaninvalid @link
{@link #
range + 2
otherwise.
-
getLevelFromSource
protected int getLevelFromSource(long pPos) - Specified by:
getLevelFromSource
in classChunkTracker
-
havePlayer
private boolean havePlayer(long pChunkPos) -
runAllUpdates
public void runAllUpdates() -
dumpChunks
-