public abstract class SectionLightStorage<M extends LightDataMap<M>> extends SectionDistanceGraph
Modifier and Type | Field and Description |
---|---|
protected it.unimi.dsi.fastutil.longs.LongSet |
activeLightSections |
protected it.unimi.dsi.fastutil.longs.LongSet |
addedActiveLightSections |
protected it.unimi.dsi.fastutil.longs.LongSet |
addedEmptySections |
protected M |
cachedLightData |
protected it.unimi.dsi.fastutil.longs.LongSet |
changedLightPositions |
private IChunkLightProvider |
chunkProvider |
private it.unimi.dsi.fastutil.longs.LongSet |
chunksToRetain |
private static Direction[] |
DIRECTIONS |
protected it.unimi.dsi.fastutil.longs.LongSet |
dirtyCachedSections |
protected static NibbleArray |
EMPTY_ARRAY |
protected boolean |
hasSectionsToUpdate |
protected it.unimi.dsi.fastutil.longs.Long2ObjectMap<NibbleArray> |
newArrays |
private it.unimi.dsi.fastutil.longs.LongSet |
noLightSections |
private LightType |
type |
protected M |
uncachedLightData |
Modifier | Constructor and Description |
---|---|
protected |
SectionLightStorage(LightType lightTypeIn,
IChunkLightProvider chunkLightProvider,
M dataMap) |
Modifier and Type | Method and Description |
---|---|
protected void |
cancelSectionUpdates(LightEngine<?,?> engine,
long sectionPosIn) |
protected void |
func_215523_k(long p_215523_1_) |
protected void |
func_215524_j(long p_215524_1_) |
protected void |
func_215526_b(long p_215526_1_,
boolean p_215526_3_) |
NibbleArray |
getArray(long sectionPosIn) |
protected NibbleArray |
getArray(long sectionPosIn,
boolean cached) |
protected NibbleArray |
getArray(M map,
long sectionPosIn) |
protected int |
getLevel(long sectionPosIn) |
protected int |
getLight(long worldPos) |
protected abstract int |
getLightOrDefault(long worldPos) |
protected NibbleArray |
getOrCreateArray(long sectionPosIn) |
protected int |
getSourceLevel(long pos) |
protected boolean |
hasSection(long sectionPosIn) |
protected boolean |
hasSectionsToUpdate() |
protected void |
processAllLevelUpdates() |
void |
retainChunkData(long sectionColumnPos,
boolean retain) |
protected void |
setData(long sectionPosIn,
NibbleArray array) |
protected void |
setLevel(long sectionPosIn,
int level) |
protected void |
setLight(long worldPos,
int lightLevel) |
protected void |
updateAndNotify() |
protected void |
updateSections(LightEngine<M,?> engine,
boolean updateSkyLight,
boolean updateBlockLight) |
protected void |
updateSectionStatus(long sectionPosIn,
boolean isEmpty) |
computeLevel, getEdgeLevel, isRoot, notifyNeighbors, updateSourceLevel
cancelUpdate, func_227465_a_, func_227467_c_, needsUpdate, processUpdates, propagateLevel, queuedUpdateSize, scheduleUpdate, scheduleUpdate
protected static final NibbleArray EMPTY_ARRAY
private static final Direction[] DIRECTIONS
private final LightType type
private final IChunkLightProvider chunkProvider
protected final it.unimi.dsi.fastutil.longs.LongSet activeLightSections
protected final it.unimi.dsi.fastutil.longs.LongSet addedEmptySections
protected final it.unimi.dsi.fastutil.longs.LongSet addedActiveLightSections
protected volatile M extends LightDataMap<M> uncachedLightData
protected final M extends LightDataMap<M> cachedLightData
protected final it.unimi.dsi.fastutil.longs.LongSet dirtyCachedSections
protected final it.unimi.dsi.fastutil.longs.LongSet changedLightPositions
protected final it.unimi.dsi.fastutil.longs.Long2ObjectMap<NibbleArray> newArrays
private final it.unimi.dsi.fastutil.longs.LongSet chunksToRetain
private final it.unimi.dsi.fastutil.longs.LongSet noLightSections
protected volatile boolean hasSectionsToUpdate
protected SectionLightStorage(LightType lightTypeIn, IChunkLightProvider chunkLightProvider, M dataMap)
protected boolean hasSection(long sectionPosIn)
@Nullable protected NibbleArray getArray(long sectionPosIn, boolean cached)
@Nullable protected NibbleArray getArray(M map, long sectionPosIn)
@Nullable public NibbleArray getArray(long sectionPosIn)
protected abstract int getLightOrDefault(long worldPos)
protected int getLight(long worldPos)
protected void setLight(long worldPos, int lightLevel)
protected int getLevel(long sectionPosIn)
getLevel
in class LevelBasedGraph
protected int getSourceLevel(long pos)
getSourceLevel
in class SectionDistanceGraph
protected void setLevel(long sectionPosIn, int level)
setLevel
in class LevelBasedGraph
protected NibbleArray getOrCreateArray(long sectionPosIn)
protected void cancelSectionUpdates(LightEngine<?,?> engine, long sectionPosIn)
protected boolean hasSectionsToUpdate()
protected void updateSections(LightEngine<M,?> engine, boolean updateSkyLight, boolean updateBlockLight)
protected void func_215524_j(long p_215524_1_)
protected void func_215523_k(long p_215523_1_)
protected void func_215526_b(long p_215526_1_, boolean p_215526_3_)
public void retainChunkData(long sectionColumnPos, boolean retain)
protected void setData(long sectionPosIn, @Nullable NibbleArray array)
protected void updateSectionStatus(long sectionPosIn, boolean isEmpty)
protected void processAllLevelUpdates()
protected void updateAndNotify()