Class LevelBasedGraph

java.lang.Object
net.minecraft.world.lighting.LevelBasedGraph
Direct Known Subclasses:
ChunkDistanceGraph, LightEngine, SectionDistanceGraph

public abstract class LevelBasedGraph extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final it.unimi.dsi.fastutil.longs.Long2ByteMap
     
    private int
     
    private boolean
     
    private final int
     
    private final it.unimi.dsi.fastutil.longs.LongLinkedOpenHashSet[]
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    LevelBasedGraph(int p_i51298_1_, int p_i51298_2_, int p_i51298_3_)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    checkEdge(long p_215469_1_, long p_215469_3_, int p_215469_5_, boolean p_215469_6_)
     
    private void
    checkEdge(long p_215474_1_, long p_215474_3_, int p_215474_5_, int p_215474_6_, int p_215474_7_, boolean p_215474_8_)
     
    private void
    checkFirstQueuedLevel(int p_215472_1_)
     
    protected final void
    checkNeighbor(long p_215475_1_, long p_215475_3_, int p_215475_5_, boolean p_215475_6_)
     
    protected abstract void
    checkNeighborsAfterUpdate(long p_215478_1_, int p_215478_3_, boolean p_215478_4_)
     
    protected void
    checkNode(long p_215473_1_)
     
    protected abstract int
    computeLevelFromNeighbor(long p_215480_1_, long p_215480_3_, int p_215480_5_)
     
    private void
    dequeue(long p_215484_1_, int p_215484_3_, int p_215484_4_, boolean p_215484_5_)
     
    private void
    enqueue(long p_215470_1_, int p_215470_3_, int p_215470_4_)
     
    protected abstract int
    getComputedLevel(long p_215477_1_, long p_215477_3_, int p_215477_5_)
     
    private int
    getKey(int p_215482_1_, int p_215482_2_)
     
    protected abstract int
    getLevel(long p_215471_1_)
     
    int
     
    protected final boolean
     
    protected abstract boolean
    isSource(long p_215485_1_)
     
    protected int
     
    protected void
    removeFromQueue(long p_215479_1_)
     
    void
    removeIf(LongPredicate p_227465_1_)
     
    protected final int
    runUpdates(int p_215483_1_)
     
    protected abstract void
    setLevel(long p_215476_1_, int p_215476_3_)
     

    Methods inherited from class java.lang.Object

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

    • levelCount

      private final int levelCount
    • queues

      private final it.unimi.dsi.fastutil.longs.LongLinkedOpenHashSet[] queues
    • computedLevels

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

      private int firstQueuedLevel
    • hasWork

      private volatile boolean hasWork
  • Constructor Details

    • LevelBasedGraph

      protected LevelBasedGraph(int p_i51298_1_, int p_i51298_2_, int p_i51298_3_)
  • Method Details

    • getKey

      private int getKey(int p_215482_1_, int p_215482_2_)
    • checkFirstQueuedLevel

      private void checkFirstQueuedLevel(int p_215472_1_)
    • removeFromQueue

      protected void removeFromQueue(long p_215479_1_)
    • removeIf

      public void removeIf(LongPredicate p_227465_1_)
    • dequeue

      private void dequeue(long p_215484_1_, int p_215484_3_, int p_215484_4_, boolean p_215484_5_)
    • enqueue

      private void enqueue(long p_215470_1_, int p_215470_3_, int p_215470_4_)
    • checkNode

      protected void checkNode(long p_215473_1_)
    • checkEdge

      protected void checkEdge(long p_215469_1_, long p_215469_3_, int p_215469_5_, boolean p_215469_6_)
    • checkEdge

      private void checkEdge(long p_215474_1_, long p_215474_3_, int p_215474_5_, int p_215474_6_, int p_215474_7_, boolean p_215474_8_)
    • checkNeighbor

      protected final void checkNeighbor(long p_215475_1_, long p_215475_3_, int p_215475_5_, boolean p_215475_6_)
    • hasWork

      protected final boolean hasWork()
    • runUpdates

      protected final int runUpdates(int p_215483_1_)
    • getQueueSize

      public int getQueueSize()
    • isSource

      protected abstract boolean isSource(long p_215485_1_)
    • getComputedLevel

      protected abstract int getComputedLevel(long p_215477_1_, long p_215477_3_, int p_215477_5_)
    • checkNeighborsAfterUpdate

      protected abstract void checkNeighborsAfterUpdate(long p_215478_1_, int p_215478_3_, boolean p_215478_4_)
    • getLevel

      protected abstract int getLevel(long p_215471_1_)
    • setLevel

      protected abstract void setLevel(long p_215476_1_, int p_215476_3_)
    • computeLevelFromNeighbor

      protected abstract int computeLevelFromNeighbor(long p_215480_1_, long p_215480_3_, int p_215480_5_)
    • queuedUpdateSize

      protected int queuedUpdateSize()