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

class DistanceManager.FixedPlayerDistanceChunkTracker extends ChunkTracker
  • Field Details

    • chunks

      protected final it.unimi.dsi.fastutil.longs.Long2ByteMap chunks
      Chunks that are at most
      invalid reference
      #range
      chunks away from the closest player.
    • maxDistance

      protected final int maxDistance
  • Constructor Details

    • FixedPlayerDistanceChunkTracker

      protected FixedPlayerDistanceChunkTracker(int pMaxDistance)
  • Method Details

    • getLevel

      protected int getLevel(long pSectionPos)
      Specified by:
      getLevel in class DynamicGraphMinFixedPoint
    • setLevel

      protected void setLevel(long pSectionPos, int pLevel)
      Specified by:
      setLevel in class DynamicGraphMinFixedPoint
    • onLevelChange

      protected void onLevelChange(long pChunkPos, int pOldLevel, int pNewLevel)
      Called after
      invalid reference
      PlayerChunkTracker#setLevel(long, int)
      puts/removes chunk into/from
      invalid reference
      #chunksInRange
      .
      Parameters:
      pOldLevel - Previous level of the chunk if it was smaller than
      invalid @link
      {@link #
      range}, range + 2 otherwise.
    • getLevelFromSource

      protected int getLevelFromSource(long pPos)
      Specified by:
      getLevelFromSource in class ChunkTracker
    • havePlayer

      private boolean havePlayer(long pChunkPos)
    • runAllUpdates

      public void runAllUpdates()
    • dumpChunks

      private void dumpChunks(String pFilename)