Package net.minecraft.world.chunk.light
Class LightStorage<M extends ChunkToNibbleArrayMap<M>>
java.lang.Object
net.minecraft.world.chunk.light.LevelPropagator
net.minecraft.world.SectionDistanceLevelPropagator
net.minecraft.world.chunk.light.LightStorage<M>
- Direct Known Subclasses:
BlockLightStorage,SkyLightStorage
public abstract class LightStorage<M extends ChunkToNibbleArrayMap<M>> extends SectionDistanceLevelPropagator
-
Field Summary
Fields Modifier and Type Field Description private ChunkProviderchunkProviderprivate static Direction[]DIRECTIONSprotected LongSetdirtySectionsprotected static ChunkNibbleArrayEMPTYprotected LongSetfield_15797protected LongSetfield_15802protected LongSetfield_15804private LongSetfield_19342private LongSetfield_25621protected booleanhasLightUpdatesprotected MlightArraysprotected Long2ObjectMap<ChunkNibbleArray>lightArraysToAddprivate LongSetlightArraysToRemoveprivate LightTypelightTypeprotected LongSetnonEmptySectionsprotected MuncachedLightArrays -
Constructor Summary
Constructors Modifier Constructor Description protectedLightStorage(LightType lightType, ChunkProvider chunkProvider, M lightData) -
Method Summary
Modifier and Type Method Description protected ChunkNibbleArraycreateLightArray(long pos)protected intget(long blockPos)protected intgetInitialLevel(long id)protected intgetLevel(long id)protected abstract intgetLight(long blockPos)ChunkNibbleArraygetLightArray(long sectionPos)protected ChunkNibbleArraygetLightArray(long sectionPos, boolean cached)protected ChunkNibbleArraygetLightArray(M storage, long sectionPos)protected booleanhasLight(long sectionPos)protected booleanhasLightUpdates()private voidmethod_29967(ChunkLightProvider<M,?> chunkLightProvider, long long2)protected voidnotifyChunkProvider()protected voidonChunkRemoved(long long2)protected voidonLightArrayCreated(long blockPos)protected voidremoveChunkData(ChunkLightProvider<?,?> storage, long blockChunkPos)protected voidset(long blockPos, int value)protected voidsetLevel(long id, int level)protected voidsetLightArray(long pos, ChunkNibbleArray array, boolean bool)protected voidsetLightEnabled(long long2, boolean bool)voidsetRetainData(long long2, boolean bool)protected voidupdateAll()protected voidupdateLightArrays(ChunkLightProvider<M,?> chunkLightProvider, boolean doSkylight, boolean skipEdgeLightPropagation)protected voidupdateSectionStatus(long pos, boolean empty)Methods inherited from class net.minecraft.world.SectionDistanceLevelPropagator
getPropagatedLevel, isMarker, propagateLevel, recalculateLevel, updateMethods inherited from class net.minecraft.world.chunk.light.LevelPropagator
applyPendingUpdates, hasPendingUpdates, method_24206, method_24208, propagateLevel, removePendingUpdate, resetLevel, updateLevel
-
Field Details
-
EMPTY
-
DIRECTIONS
-
lightType
-
chunkProvider
-
nonEmptySections
-
field_15797
-
field_15804
-
uncachedLightArrays
-
lightArrays
-
field_15802
-
dirtySections
-
lightArraysToAdd
-
field_25621
-
field_19342
-
lightArraysToRemove
-
hasLightUpdates
protected volatile boolean hasLightUpdates
-
-
Constructor Details
-
Method Details
-
hasLight
protected boolean hasLight(long sectionPos) -
getLightArray
-
getLightArray
-
getLightArray
-
getLight
protected abstract int getLight(long blockPos) -
get
protected int get(long blockPos) -
set
protected void set(long blockPos, int value) -
getLevel
protected int getLevel(long id)- Specified by:
getLevelin classLevelPropagator
-
getInitialLevel
protected int getInitialLevel(long id)- Specified by:
getInitialLevelin classSectionDistanceLevelPropagator
-
setLevel
protected void setLevel(long id, int level)- Specified by:
setLevelin classLevelPropagator
-
createLightArray
-
removeChunkData
-
hasLightUpdates
protected boolean hasLightUpdates() -
updateLightArrays
protected void updateLightArrays(ChunkLightProvider<M,?> chunkLightProvider, boolean doSkylight, boolean skipEdgeLightPropagation) -
method_29967
-
onLightArrayCreated
protected void onLightArrayCreated(long blockPos) -
onChunkRemoved
protected void onChunkRemoved(long long2) -
setLightEnabled
protected void setLightEnabled(long long2, boolean bool) -
setRetainData
public void setRetainData(long long2, boolean bool) -
setLightArray
-
updateSectionStatus
protected void updateSectionStatus(long pos, boolean empty) -
updateAll
protected void updateAll() -
notifyChunkProvider
protected void notifyChunkProvider()
-