Package net.minecraft.server.level
Class ChunkTracker
java.lang.Object
net.minecraft.world.level.lighting.DynamicGraphMinFixedPoint
net.minecraft.server.level.ChunkTracker
- Direct Known Subclasses:
DistanceManager.ChunkTicketTracker,DistanceManager.FixedPlayerDistanceChunkTracker,TickingTracker
-
Field Summary
Fields inherited from class net.minecraft.world.level.lighting.DynamicGraphMinFixedPoint
levelCount, SOURCE -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedChunkTracker(int firstQueuedLevel, int width, int height) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcheckNeighborsAfterUpdate(long pos, int level, boolean isDecreasing) protected intcomputeLevelFromNeighbor(long startPos, long endPos, int startLevel) Returns level propagated from start position with specified level to the neighboring end position.protected intgetComputedLevel(long pos, long excludedSourcePos, int level) Computes level propagated from neighbors of specified position with given existing level, excluding the given source position.protected abstract intgetLevelFromSource(long pos) protected booleanisSource(long pos) voidupdate(long pos, int level, boolean isDecreasing) Methods inherited from class net.minecraft.world.level.lighting.DynamicGraphMinFixedPoint
checkEdge, checkNeighbor, checkNode, getLevel, getQueueSize, hasWork, removeFromQueue, removeIf, runUpdates, setLevel
-
Constructor Details
-
ChunkTracker
protected ChunkTracker(int firstQueuedLevel, int width, int height)
-
-
Method Details
-
isSource
protected boolean isSource(long pos) - Overrides:
isSourcein classDynamicGraphMinFixedPoint
-
checkNeighborsAfterUpdate
protected void checkNeighborsAfterUpdate(long pos, int level, boolean isDecreasing) - Specified by:
checkNeighborsAfterUpdatein classDynamicGraphMinFixedPoint
-
getComputedLevel
protected int getComputedLevel(long pos, long excludedSourcePos, int level) 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 startPos, long endPos, int startLevel) Returns level propagated from start position with specified level to the neighboring end position.- Specified by:
computeLevelFromNeighborin classDynamicGraphMinFixedPoint
-
getLevelFromSource
protected abstract int getLevelFromSource(long pos) -
update
public void update(long pos, int level, boolean isDecreasing)
-