Class ChunkTracker
java.lang.Object
net.minecraft.world.level.lighting.DynamicGraphMinFixedPoint
net.minecraft.server.level.ChunkTracker
- Direct Known Subclasses:
DistanceManager.FixedPlayerDistanceChunkTracker, LoadingChunkTracker, SimulationChunkTracker
-
Field Summary
Fields inherited from class DynamicGraphMinFixedPoint
levelCount, SOURCE -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedChunkTracker(int levelCount, int minQueueSize, int minMapSize) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcheckNeighborsAfterUpdate(long node, int level, boolean onlyDecrease) protected intcomputeLevelFromNeighbor(long from, long to, int fromLevel) Returns level propagated from start position with specified level to the neighboring end position.protected intgetComputedLevel(long node, long knownParent, int knownLevelFromParent) Computes level propagated from neighbors of specified position with given existing level, excluding the given source position.protected abstract intgetLevelFromSource(long to) protected booleanisSource(long node) voidupdate(long node, int newLevelFrom, boolean onlyDecreased) Methods inherited from class DynamicGraphMinFixedPoint
checkEdge, checkNeighbor, checkNode, getLevel, getQueueSize, hasWork, removeFromQueue, removeIf, runUpdates, setLevel
-
Constructor Details
-
ChunkTracker
protected ChunkTracker(int levelCount, int minQueueSize, int minMapSize)
-
-
Method Details
-
isSource
protected boolean isSource(long node) - Overrides:
isSourcein classDynamicGraphMinFixedPoint
-
checkNeighborsAfterUpdate
protected void checkNeighborsAfterUpdate(long node, int level, boolean onlyDecrease) - Specified by:
checkNeighborsAfterUpdatein classDynamicGraphMinFixedPoint
-
getComputedLevel
protected int getComputedLevel(long node, long knownParent, int knownLevelFromParent) Computes level propagated from neighbors of specified position with given existing level, excluding the given source position.- Specified by:
getComputedLevelin classDynamicGraphMinFixedPoint
-
computeLevelFromNeighbor
protected int computeLevelFromNeighbor(long from, long to, int fromLevel) Returns level propagated from start position with specified level to the neighboring end position.- Specified by:
computeLevelFromNeighborin classDynamicGraphMinFixedPoint
-
getLevelFromSource
protected abstract int getLevelFromSource(long to) -
update
public void update(long node, int newLevelFrom, boolean onlyDecreased)
-