Class LayerLightSectionStorage<M extends DataLayerStorageMap<M>>

java.lang.Object
net.minecraft.world.level.lighting.LayerLightSectionStorage<M>
Direct Known Subclasses:
BlockLightSectionStorage, SkyLightSectionStorage

public abstract class LayerLightSectionStorage<M extends DataLayerStorageMap<M>> extends Object
  • Field Details

    • layer

      private final LightLayer layer
    • chunkSource

      protected final LightChunkGetter chunkSource
    • sectionStates

      protected final it.unimi.dsi.fastutil.longs.Long2ByteMap sectionStates
    • columnsWithSources

      private final it.unimi.dsi.fastutil.longs.LongSet columnsWithSources
    • visibleSectionData

      protected volatile M extends DataLayerStorageMap<M> visibleSectionData
    • updatingSectionData

      protected final M extends DataLayerStorageMap<M> updatingSectionData
    • changedSections

      protected final it.unimi.dsi.fastutil.longs.LongSet changedSections
    • sectionsAffectedByLightUpdates

      protected final it.unimi.dsi.fastutil.longs.LongSet sectionsAffectedByLightUpdates
    • queuedSections

      protected final it.unimi.dsi.fastutil.longs.Long2ObjectMap<DataLayer> queuedSections
    • columnsToRetainQueuedDataFor

      private final it.unimi.dsi.fastutil.longs.LongSet columnsToRetainQueuedDataFor
      Section column positions (section positions with Y=0) that need to be kept even if some of their sections could otherwise be removed.
    • toRemove

      private final it.unimi.dsi.fastutil.longs.LongSet toRemove
      Set of section positions that can be removed, because their light won't affect any blocks.
    • hasInconsistencies

      protected volatile boolean hasInconsistencies
  • Constructor Details

  • Method Details

    • storingLightForSection

      protected boolean storingLightForSection(long sectionNode)
    • getDataLayer

      protected @Nullable DataLayer getDataLayer(long sectionNode, boolean updating)
    • getDataLayer

      protected @Nullable DataLayer getDataLayer(M sections, long sectionNode)
    • getDataLayerToWrite

      protected @Nullable DataLayer getDataLayerToWrite(long sectionNode)
    • getDataLayerData

      public @Nullable DataLayer getDataLayerData(long sectionNode)
    • getLightValue

      protected abstract int getLightValue(long blockNode)
    • getStoredLevel

      protected int getStoredLevel(long blockNode)
    • setStoredLevel

      protected void setStoredLevel(long blockNode, int level)
    • markSectionAndNeighborsAsAffected

      protected void markSectionAndNeighborsAsAffected(long sectionNode)
    • createDataLayer

      protected DataLayer createDataLayer(long sectionNode)
    • hasInconsistencies

      protected boolean hasInconsistencies()
    • markNewInconsistencies

      protected void markNewInconsistencies(LightEngine<M,?> engine)
    • onNodeAdded

      protected void onNodeAdded(long sectionNode)
    • onNodeRemoved

      protected void onNodeRemoved(long sectionNode)
    • setLightEnabled

      protected void setLightEnabled(long zeroNode, boolean enable)
    • lightOnInSection

      protected boolean lightOnInSection(long sectionNode)
    • lightOnInColumn

      protected boolean lightOnInColumn(long sectionZeroNode)
    • retainData

      public void retainData(long zeroNode, boolean retain)
    • queueSectionData

      protected void queueSectionData(long sectionNode, @Nullable DataLayer data)
    • updateSectionStatus

      protected void updateSectionStatus(long sectionNode, boolean sectionEmpty)
    • putSectionState

      protected void putSectionState(long sectionNode, byte state)
    • initializeSection

      private void initializeSection(long sectionNode)
    • removeSection

      private void removeSection(long sectionNode)
    • swapSectionMap

      protected void swapSectionMap()
    • getDebugSectionType

      public LayerLightSectionStorage.SectionType getDebugSectionType(long sectionNode)