Class DynamicGraphMinFixedPoint

java.lang.Object
net.minecraft.world.level.lighting.DynamicGraphMinFixedPoint
Direct Known Subclasses:
ChunkTracker, SectionTracker

public abstract class DynamicGraphMinFixedPoint extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final it.unimi.dsi.fastutil.longs.Long2ByteMap
     
    private boolean
     
    protected final int
     
    private static final int
     
    private final LeveledPriorityQueue
     
    static final long
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    DynamicGraphMinFixedPoint(int pFirstQueuedLevel, int pWidth, int pHeight)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    private int
    calculatePriority(int pOldLevel, int pNewLevel)
     
    protected void
    checkEdge(long pFromPos, long pToPos, int pNewLevel, boolean pIsDecreasing)
     
    private void
    checkEdge(long pFromPos, long pToPos, int pNewLevel, int pPreviousLevel, int pPropagationLevel, boolean pIsDecreasing)
     
    protected final void
    checkNeighbor(long pFromPos, long pToPos, int pSourceLevel, boolean pIsDecreasing)
     
    protected abstract void
    checkNeighborsAfterUpdate(long pPos, int pLevel, boolean pIsDecreasing)
     
    protected void
    checkNode(long pLevelPos)
     
    protected abstract int
    computeLevelFromNeighbor(long pStartPos, long pEndPos, int pStartLevel)
    Returns level propagated from start position with specified level to the neighboring end position.
    protected abstract int
    getComputedLevel(long pPos, long pExcludedSourcePos, int pLevel)
    Computes level propagated from neighbors of specified position with given existing level, excluding the given source position.
    protected abstract int
    getLevel(long pChunkPos)
     
    int
     
    protected final boolean
     
    protected boolean
    isSource(long pPos)
     
    protected void
    removeFromQueue(long p_75601_)
     
    void
    removeIf(LongPredicate pPredicate)
     
    protected final int
    runUpdates(int pToUpdateCount)
     
    protected abstract void
    setLevel(long pChunkPos, int pLevel)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • SOURCE

      public static final long SOURCE
      See Also:
    • NO_COMPUTED_LEVEL

      private static final int NO_COMPUTED_LEVEL
      See Also:
    • levelCount

      protected final int levelCount
    • priorityQueue

      private final LeveledPriorityQueue priorityQueue
    • computedLevels

      private final it.unimi.dsi.fastutil.longs.Long2ByteMap computedLevels
    • hasWork

      private volatile boolean hasWork
  • Constructor Details

    • DynamicGraphMinFixedPoint

      protected DynamicGraphMinFixedPoint(int pFirstQueuedLevel, int pWidth, int pHeight)
  • Method Details

    • removeFromQueue

      protected void removeFromQueue(long p_75601_)
    • removeIf

      public void removeIf(LongPredicate pPredicate)
    • calculatePriority

      private int calculatePriority(int pOldLevel, int pNewLevel)
    • checkNode

      protected void checkNode(long pLevelPos)
    • checkEdge

      protected void checkEdge(long pFromPos, long pToPos, int pNewLevel, boolean pIsDecreasing)
    • checkEdge

      private void checkEdge(long pFromPos, long pToPos, int pNewLevel, int pPreviousLevel, int pPropagationLevel, boolean pIsDecreasing)
    • checkNeighbor

      protected final void checkNeighbor(long pFromPos, long pToPos, int pSourceLevel, boolean pIsDecreasing)
    • hasWork

      protected final boolean hasWork()
    • runUpdates

      protected final int runUpdates(int pToUpdateCount)
    • getQueueSize

      public int getQueueSize()
    • isSource

      protected boolean isSource(long pPos)
    • getComputedLevel

      protected abstract int getComputedLevel(long pPos, long pExcludedSourcePos, int pLevel)
      Computes level propagated from neighbors of specified position with given existing level, excluding the given source position.
    • checkNeighborsAfterUpdate

      protected abstract void checkNeighborsAfterUpdate(long pPos, int pLevel, boolean pIsDecreasing)
    • getLevel

      protected abstract int getLevel(long pChunkPos)
    • setLevel

      protected abstract void setLevel(long pChunkPos, int pLevel)
    • computeLevelFromNeighbor

      protected abstract int computeLevelFromNeighbor(long pStartPos, long pEndPos, int pStartLevel)
      Returns level propagated from start position with specified level to the neighboring end position.