Package net.minecraft.world.lighting
Class SectionLightStorage<M extends LightDataMap<M>>
- java.lang.Object
-
- net.minecraft.world.lighting.LevelBasedGraph
-
- net.minecraft.util.SectionDistanceGraph
-
- net.minecraft.world.lighting.SectionLightStorage<M>
-
- Direct Known Subclasses:
BlockLightStorage
,SkyLightStorage
public abstract class SectionLightStorage<M extends LightDataMap<M>> extends SectionDistanceGraph
-
-
Field Summary
Fields Modifier and Type Field Description protected it.unimi.dsi.fastutil.longs.LongSet
changedSections
private IChunkLightProvider
chunkSource
private it.unimi.dsi.fastutil.longs.LongSet
columnsToRetainQueuedDataFor
protected it.unimi.dsi.fastutil.longs.LongSet
dataSectionSet
private static Direction[]
DIRECTIONS
protected static NibbleArray
EMPTY_DATA
protected boolean
hasToRemove
private LightType
layer
protected it.unimi.dsi.fastutil.longs.Long2ObjectMap<NibbleArray>
queuedSections
protected it.unimi.dsi.fastutil.longs.LongSet
sectionsAffectedByLightUpdates
protected it.unimi.dsi.fastutil.longs.LongSet
toMarkData
protected it.unimi.dsi.fastutil.longs.LongSet
toMarkNoData
private it.unimi.dsi.fastutil.longs.LongSet
toRemove
private it.unimi.dsi.fastutil.longs.LongSet
untrustedSections
protected M
updatingSectionData
protected M
visibleSectionData
-
Constructor Summary
Constructors Modifier Constructor Description protected
SectionLightStorage(LightType p_i51291_1_, IChunkLightProvider p_i51291_2_, M p_i51291_3_)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description private void
checkEdgesForSection(LightEngine<M,?> p_241538_1_, long p_241538_2_)
protected void
clearQueuedSectionBlocks(LightEngine<?,?> p_215528_1_, long p_215528_2_)
protected NibbleArray
createDataLayer(long p_215530_1_)
protected void
enableLightSources(long p_215526_1_, boolean p_215526_3_)
protected NibbleArray
getDataLayer(long p_215520_1_, boolean p_215520_3_)
protected NibbleArray
getDataLayer(M p_215531_1_, long p_215531_2_)
NibbleArray
getDataLayerData(long p_222858_1_)
protected int
getLevel(long p_215471_1_)
protected int
getLevelFromSource(long p_215516_1_)
protected abstract int
getLightValue(long p_215525_1_)
protected int
getStoredLevel(long p_215521_1_)
protected boolean
hasInconsistencies()
protected void
markNewInconsistencies(LightEngine<M,?> p_215522_1_, boolean p_215522_2_, boolean p_215522_3_)
protected void
onNodeAdded(long p_215524_1_)
protected void
onNodeRemoved(long p_215523_1_)
protected void
queueSectionData(long p_215529_1_, NibbleArray p_215529_3_, boolean p_215529_4_)
void
retainData(long p_223113_1_, boolean p_223113_3_)
protected void
runAllUpdates()
protected void
setLevel(long p_215476_1_, int p_215476_3_)
protected void
setStoredLevel(long p_215517_1_, int p_215517_3_)
protected boolean
storingLightForSection(long p_215518_1_)
protected void
swapSectionMap()
protected void
updateSectionStatus(long p_215519_1_, boolean p_215519_3_)
-
Methods inherited from class net.minecraft.util.SectionDistanceGraph
checkNeighborsAfterUpdate, computeLevelFromNeighbor, getComputedLevel, isSource, update
-
Methods inherited from class net.minecraft.world.lighting.LevelBasedGraph
checkEdge, checkNeighbor, checkNode, getQueueSize, hasWork, queuedUpdateSize, removeFromQueue, removeIf, runUpdates
-
-
-
-
Field Detail
-
EMPTY_DATA
protected static final NibbleArray EMPTY_DATA
-
DIRECTIONS
private static final Direction[] DIRECTIONS
-
layer
private final LightType layer
-
chunkSource
private final IChunkLightProvider chunkSource
-
dataSectionSet
protected final it.unimi.dsi.fastutil.longs.LongSet dataSectionSet
-
toMarkNoData
protected final it.unimi.dsi.fastutil.longs.LongSet toMarkNoData
-
toMarkData
protected final it.unimi.dsi.fastutil.longs.LongSet toMarkData
-
visibleSectionData
protected volatile M extends LightDataMap<M> visibleSectionData
-
updatingSectionData
protected final M extends LightDataMap<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<NibbleArray> queuedSections
-
untrustedSections
private final it.unimi.dsi.fastutil.longs.LongSet untrustedSections
-
columnsToRetainQueuedDataFor
private final it.unimi.dsi.fastutil.longs.LongSet columnsToRetainQueuedDataFor
-
toRemove
private final it.unimi.dsi.fastutil.longs.LongSet toRemove
-
hasToRemove
protected volatile boolean hasToRemove
-
-
Constructor Detail
-
SectionLightStorage
protected SectionLightStorage(LightType p_i51291_1_, IChunkLightProvider p_i51291_2_, M p_i51291_3_)
-
-
Method Detail
-
storingLightForSection
protected boolean storingLightForSection(long p_215518_1_)
-
getDataLayer
@Nullable protected NibbleArray getDataLayer(long p_215520_1_, boolean p_215520_3_)
-
getDataLayer
@Nullable protected NibbleArray getDataLayer(M p_215531_1_, long p_215531_2_)
-
getDataLayerData
@Nullable public NibbleArray getDataLayerData(long p_222858_1_)
-
getLightValue
protected abstract int getLightValue(long p_215525_1_)
-
getStoredLevel
protected int getStoredLevel(long p_215521_1_)
-
setStoredLevel
protected void setStoredLevel(long p_215517_1_, int p_215517_3_)
-
getLevel
protected int getLevel(long p_215471_1_)
- Specified by:
getLevel
in classLevelBasedGraph
-
getLevelFromSource
protected int getLevelFromSource(long p_215516_1_)
- Specified by:
getLevelFromSource
in classSectionDistanceGraph
-
setLevel
protected void setLevel(long p_215476_1_, int p_215476_3_)
- Specified by:
setLevel
in classLevelBasedGraph
-
createDataLayer
protected NibbleArray createDataLayer(long p_215530_1_)
-
clearQueuedSectionBlocks
protected void clearQueuedSectionBlocks(LightEngine<?,?> p_215528_1_, long p_215528_2_)
-
hasInconsistencies
protected boolean hasInconsistencies()
-
markNewInconsistencies
protected void markNewInconsistencies(LightEngine<M,?> p_215522_1_, boolean p_215522_2_, boolean p_215522_3_)
-
checkEdgesForSection
private void checkEdgesForSection(LightEngine<M,?> p_241538_1_, long p_241538_2_)
-
onNodeAdded
protected void onNodeAdded(long p_215524_1_)
-
onNodeRemoved
protected void onNodeRemoved(long p_215523_1_)
-
enableLightSources
protected void enableLightSources(long p_215526_1_, boolean p_215526_3_)
-
retainData
public void retainData(long p_223113_1_, boolean p_223113_3_)
-
queueSectionData
protected void queueSectionData(long p_215529_1_, @Nullable NibbleArray p_215529_3_, boolean p_215529_4_)
-
updateSectionStatus
protected void updateSectionStatus(long p_215519_1_, boolean p_215519_3_)
-
runAllUpdates
protected void runAllUpdates()
-
swapSectionMap
protected void swapSectionMap()
-
-