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 pFilename) protected intgetLevel(long pSectionPos) protected intgetLevelFromSource(long pPos) private booleanhavePlayer(long pChunkPos) protected voidonLevelChange(long pChunkPos, int pOldLevel, int pNewLevel) Called afterputs/removes chunk into/frominvalid reference
PlayerChunkTracker#setLevel(long, int).invalid reference
#chunksInRangevoidprotected voidsetLevel(long pSectionPos, int pLevel) 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 pMaxDistance)
-
-
Method Details
-
getLevel
protected int getLevel(long pSectionPos) - Specified by:
getLevelin classDynamicGraphMinFixedPoint
-
setLevel
protected void setLevel(long pSectionPos, int pLevel) - Specified by:
setLevelin classDynamicGraphMinFixedPoint
-
onLevelChange
protected void onLevelChange(long pChunkPos, int pOldLevel, int pNewLevel) Called afterputs/removes chunk into/frominvalid reference
PlayerChunkTracker#setLevel(long, int).invalid reference
#chunksInRange- Parameters:
pOldLevel- Previous level of the chunk if it was smaller thanrange},invalid @link
{@link #range + 2otherwise.
-
getLevelFromSource
protected int getLevelFromSource(long pPos) - Specified by:
getLevelFromSourcein classChunkTracker
-
havePlayer
private boolean havePlayer(long pChunkPos) -
runAllUpdates
public void runAllUpdates() -
dumpChunks
-