Package net.minecraft.world.chunk.light
Class LightStorage<M extends ChunkToNibbleArrayMap<M>>
java.lang.Object
net.minecraft.world.chunk.light.LightStorage<M>
- Direct Known Subclasses:
- BlockLightStorage,- SkyLightStorage
LightStorage handles the access, storage and propagation of a specific kind of light within the world.
 For example, separate instances will be used to store block light as opposed to sky light.
 
The smallest unit within LightStorage is the section. Sections represent a cube of 16x16x16 blocks and their lighting data. In turn, 16 sections stacked on top of each other form a column, which are analogous to the standard 16x256x16 world chunks.
To avoid allocations, LightStorage packs all the coordinate arguments into single long values. Extra care should be taken to ensure that the relevant types are being used where appropriate.
- See Also:
- Mappings:
- Namespace - Name - named - net/minecraft/world/chunk/light/LightStorage- intermediary - net/minecraft/class_3560- official - eso
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionprotected static classstatic enum
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected final ChunkProviderprivate final LongSetprotected final LongSetprivate final LongSetprotected booleanprivate final LightTypeprotected final LongSetprotected final Long2ObjectMap<ChunkNibbleArray> protected final Long2ByteMapprivate final LongSetprotected final Mprotected M
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedLightStorage(LightType lightType, ChunkProvider chunkProvider, M lightData) 
- 
Method SummaryModifier and TypeMethodDescriptionprotected voidaddNotifySections(long id) protected ChunkNibbleArraycreateSection(long sectionPos) protected voidenqueueSectionData(long sectionPos, @Nullable ChunkNibbleArray array) protected intget(long blockPos) protected abstract intgetLight(long blockPos) getLightSection(long sectionPos) protected @Nullable ChunkNibbleArraygetLightSection(long sectionPos, boolean cached) protected @Nullable ChunkNibbleArraygetLightSection(M storage, long sectionPos) getStatus(long sectionPos) protected booleanprotected booleanhasSection(long sectionPos) protected booleanisColumnEnabled(long columnPos) protected booleanisSectionInEnabledColumn(long sectionPos) protected @Nullable ChunkNibbleArraymethod_51547(long sectionPos) protected voidprotected voidonLoadSection(long sectionPos) protected voidonUnloadSection(long sectionPos) private voidqueueForRemoval(long sectionPos) private voidqueueForUpdate(long sectionPos) protected voidset(long blockPos, int value) protected voidsetColumnEnabled(long columnPos, boolean enabled) voidsetRetainColumn(long sectionPos, boolean retain) protected voidsetSectionPropagation(long sectionPos, byte flags) protected voidsetSectionStatus(long sectionPos, boolean notReady) protected voidupdateLight(ChunkLightProvider<M, ?> lightProvider) 
- 
Field Details- 
lightType- Mappings:
- Namespace - Name - Mixin selector - named - lightType- Lnet/minecraft/world/chunk/light/LightStorage;lightType:Lnet/minecraft/world/LightType;- intermediary - field_15805- Lnet/minecraft/class_3560;field_15805:Lnet/minecraft/class_1944;- official - i- Leso;i:Ldgs;
 
- 
chunkProvider- Mappings:
- Namespace - Name - Mixin selector - named - chunkProvider- Lnet/minecraft/world/chunk/light/LightStorage;chunkProvider:Lnet/minecraft/world/chunk/ChunkProvider;- intermediary - field_15803- Lnet/minecraft/class_3560;field_15803:Lnet/minecraft/class_2823;- official - a- Leso;a:Ldzg;
 
- 
sectionPropagations- Mappings:
- Namespace - Name - Mixin selector - named - sectionPropagations- Lnet/minecraft/world/chunk/light/LightStorage;sectionPropagations:Lit/unimi/dsi/fastutil/longs/Long2ByteMap;- intermediary - field_44716- Lnet/minecraft/class_3560;field_44716:Lit/unimi/dsi/fastutil/longs/Long2ByteMap;- official - b- Leso;b:Lit/unimi/dsi/fastutil/longs/Long2ByteMap;
 
- 
enabledColumns- Mappings:
- Namespace - Name - Mixin selector - named - enabledColumns- Lnet/minecraft/world/chunk/light/LightStorage;enabledColumns:Lit/unimi/dsi/fastutil/longs/LongSet;- intermediary - field_44718- Lnet/minecraft/class_3560;field_44718:Lit/unimi/dsi/fastutil/longs/LongSet;- official - j- Leso;j:Lit/unimi/dsi/fastutil/longs/LongSet;
 
- 
uncachedStorage- Mappings:
- Namespace - Name - Mixin selector - named - uncachedStorage- Lnet/minecraft/world/chunk/light/LightStorage;uncachedStorage:Lnet/minecraft/world/chunk/ChunkToNibbleArrayMap;- intermediary - field_15806- Lnet/minecraft/class_3560;field_15806:Lnet/minecraft/class_3556;- official - c- Leso;c:Lesl;
 
- 
storage- Mappings:
- Namespace - Name - Mixin selector - named - storage- Lnet/minecraft/world/chunk/light/LightStorage;storage:Lnet/minecraft/world/chunk/ChunkToNibbleArrayMap;- intermediary - field_15796- Lnet/minecraft/class_3560;field_15796:Lnet/minecraft/class_3556;- official - d- Leso;d:Lesl;
 
- 
dirtySections- Mappings:
- Namespace - Name - Mixin selector - named - dirtySections- Lnet/minecraft/world/chunk/light/LightStorage;dirtySections:Lit/unimi/dsi/fastutil/longs/LongSet;- intermediary - field_15802- Lnet/minecraft/class_3560;field_15802:Lit/unimi/dsi/fastutil/longs/LongSet;- official - e- Leso;e:Lit/unimi/dsi/fastutil/longs/LongSet;
 
- 
notifySections- Mappings:
- Namespace - Name - Mixin selector - named - notifySections- Lnet/minecraft/world/chunk/light/LightStorage;notifySections:Lit/unimi/dsi/fastutil/longs/LongSet;- intermediary - field_16448- Lnet/minecraft/class_3560;field_16448:Lit/unimi/dsi/fastutil/longs/LongSet;- official - f- Leso;f:Lit/unimi/dsi/fastutil/longs/LongSet;
 
- 
queuedSections- Mappings:
- Namespace - Name - Mixin selector - named - queuedSections- Lnet/minecraft/world/chunk/light/LightStorage;queuedSections:Lit/unimi/dsi/fastutil/longs/Long2ObjectMap;- intermediary - field_15807- Lnet/minecraft/class_3560;field_15807:Lit/unimi/dsi/fastutil/longs/Long2ObjectMap;- official - g- Leso;g:Lit/unimi/dsi/fastutil/longs/Long2ObjectMap;
 
- 
columnsToRetain- Mappings:
- Namespace - Name - Mixin selector - named - columnsToRetain- Lnet/minecraft/world/chunk/light/LightStorage;columnsToRetain:Lit/unimi/dsi/fastutil/longs/LongSet;- intermediary - field_19342- Lnet/minecraft/class_3560;field_19342:Lit/unimi/dsi/fastutil/longs/LongSet;- official - k- Leso;k:Lit/unimi/dsi/fastutil/longs/LongSet;
 
- 
sectionsToRemove- Mappings:
- Namespace - Name - Mixin selector - named - sectionsToRemove- Lnet/minecraft/world/chunk/light/LightStorage;sectionsToRemove:Lit/unimi/dsi/fastutil/longs/LongSet;- intermediary - field_15798- Lnet/minecraft/class_3560;field_15798:Lit/unimi/dsi/fastutil/longs/LongSet;- official - l- Leso;l:Lit/unimi/dsi/fastutil/longs/LongSet;
 
- 
hasLightUpdatesprotected volatile boolean hasLightUpdates- Mappings:
- Namespace - Name - Mixin selector - named - hasLightUpdates- Lnet/minecraft/world/chunk/light/LightStorage;hasLightUpdates:Z- intermediary - field_44717- Lnet/minecraft/class_3560;field_44717:Z- official - h- Leso;h:Z
 
 
- 
- 
Constructor Details- 
LightStorage- Mappings:
- Namespace - Name - Mixin selector - named - <init>- Lnet/minecraft/world/chunk/light/LightStorage;<init>(Lnet/minecraft/world/LightType;Lnet/minecraft/world/chunk/ChunkProvider;Lnet/minecraft/world/chunk/ChunkToNibbleArrayMap;)V- intermediary - <init>- Lnet/minecraft/class_3560;<init>(Lnet/minecraft/class_1944;Lnet/minecraft/class_2823;Lnet/minecraft/class_3556;)V- official - <init>- Leso;<init>(Ldgs;Ldzg;Lesl;)V
 
 
- 
- 
Method Details- 
hasSectionprotected boolean hasSection(long sectionPos) - Mappings:
- Namespace - Name - Mixin selector - named - hasSection- Lnet/minecraft/world/chunk/light/LightStorage;hasSection(J)Z- intermediary - method_15524- Lnet/minecraft/class_3560;method_15524(J)Z- official - b- Leso;b(J)Z
 
- 
getLightSection- Mappings:
- Namespace - Name - Mixin selector - named - getLightSection- Lnet/minecraft/world/chunk/light/LightStorage;getLightSection(JZ)Lnet/minecraft/world/chunk/ChunkNibbleArray;- intermediary - method_15522- Lnet/minecraft/class_3560;method_15522(JZ)Lnet/minecraft/class_2804;- official - a- Leso;a(JZ)Ldyy;
 
- 
getLightSection- Mappings:
- Namespace - Name - Mixin selector - named - getLightSection- Lnet/minecraft/world/chunk/light/LightStorage;getLightSection(Lnet/minecraft/world/chunk/ChunkToNibbleArrayMap;J)Lnet/minecraft/world/chunk/ChunkNibbleArray;- intermediary - method_15533- Lnet/minecraft/class_3560;method_15533(Lnet/minecraft/class_3556;J)Lnet/minecraft/class_2804;- official - a- Leso;a(Lesl;J)Ldyy;
 
- 
method_51547- Mappings:
- Namespace - Name - Mixin selector - named - method_51547- Lnet/minecraft/world/chunk/light/LightStorage;method_51547(J)Lnet/minecraft/world/chunk/ChunkNibbleArray;- intermediary - method_51547- Lnet/minecraft/class_3560;method_51547(J)Lnet/minecraft/class_2804;- official - c- Leso;c(J)Ldyy;
 
- 
getLightSection- Mappings:
- Namespace - Name - Mixin selector - named - getLightSection- Lnet/minecraft/world/chunk/light/LightStorage;getLightSection(J)Lnet/minecraft/world/chunk/ChunkNibbleArray;- intermediary - method_20533- Lnet/minecraft/class_3560;method_20533(J)Lnet/minecraft/class_2804;- official - d- Leso;d(J)Ldyy;
 
- 
getLightprotected abstract int getLight(long blockPos) - Mappings:
- Namespace - Name - Mixin selector - named - getLight- Lnet/minecraft/world/chunk/light/LightStorage;getLight(J)I- intermediary - method_15538- Lnet/minecraft/class_3560;method_15538(J)I- official - a- Leso;a(J)I
 
- 
getprotected int get(long blockPos) - Mappings:
- Namespace - Name - Mixin selector - named - get- Lnet/minecraft/world/chunk/light/LightStorage;get(J)I- intermediary - method_15537- Lnet/minecraft/class_3560;method_15537(J)I- official - e- Leso;e(J)I
 
- 
setprotected void set(long blockPos, int value) - Mappings:
- Namespace - Name - Mixin selector - named - set- Lnet/minecraft/world/chunk/light/LightStorage;set(JI)V- intermediary - method_15525- Lnet/minecraft/class_3560;method_15525(JI)V- official - a- Leso;a(JI)V
 
- 
addNotifySectionsprotected void addNotifySections(long id) - Mappings:
- Namespace - Name - Mixin selector - named - addNotifySections- Lnet/minecraft/world/chunk/light/LightStorage;addNotifySections(J)V- intermediary - method_51415- Lnet/minecraft/class_3560;method_51415(J)V- official - f- Leso;f(J)V
 
- 
createSection- Mappings:
- Namespace - Name - Mixin selector - named - createSection- Lnet/minecraft/world/chunk/light/LightStorage;createSection(J)Lnet/minecraft/world/chunk/ChunkNibbleArray;- intermediary - method_15529- Lnet/minecraft/class_3560;method_15529(J)Lnet/minecraft/class_2804;- official - g- Leso;g(J)Ldyy;
 
- 
hasLightUpdatesprotected boolean hasLightUpdates()- Mappings:
- Namespace - Name - Mixin selector - named - hasLightUpdates- Lnet/minecraft/world/chunk/light/LightStorage;hasLightUpdates()Z- intermediary - method_15528- Lnet/minecraft/class_3560;method_15528()Z- official - a- Leso;a()Z
 
- 
updateLight- Mappings:
- Namespace - Name - Mixin selector - named - updateLight- Lnet/minecraft/world/chunk/light/LightStorage;updateLight(Lnet/minecraft/world/chunk/light/ChunkLightProvider;)V- intermediary - method_15527- Lnet/minecraft/class_3560;method_15527(Lnet/minecraft/class_3558;)V- official - a- Leso;a(Lesr;)V
 
- 
onLoadSectionprotected void onLoadSection(long sectionPos) - Mappings:
- Namespace - Name - Mixin selector - named - onLoadSection- Lnet/minecraft/world/chunk/light/LightStorage;onLoadSection(J)V- intermediary - method_15523- Lnet/minecraft/class_3560;method_15523(J)V- official - h- Leso;h(J)V
 
- 
onUnloadSectionprotected void onUnloadSection(long sectionPos) - Mappings:
- Namespace - Name - Mixin selector - named - onUnloadSection- Lnet/minecraft/world/chunk/light/LightStorage;onUnloadSection(J)V- intermediary - method_15534- Lnet/minecraft/class_3560;method_15534(J)V- official - i- Leso;i(J)V
 
- 
setColumnEnabledprotected void setColumnEnabled(long columnPos, boolean enabled) - Mappings:
- Namespace - Name - Mixin selector - named - setColumnEnabled- Lnet/minecraft/world/chunk/light/LightStorage;setColumnEnabled(JZ)V- intermediary - method_15535- Lnet/minecraft/class_3560;method_15535(JZ)V- official - b- Leso;b(JZ)V
 
- 
isSectionInEnabledColumnprotected boolean isSectionInEnabledColumn(long sectionPos) - Mappings:
- Namespace - Name - Mixin selector - named - isSectionInEnabledColumn- Lnet/minecraft/world/chunk/light/LightStorage;isSectionInEnabledColumn(J)Z- intermediary - method_51548- Lnet/minecraft/class_3560;method_51548(J)Z- official - j- Leso;j(J)Z
 
- 
isColumnEnabledprotected boolean isColumnEnabled(long columnPos) - Mappings:
- Namespace - Name - Mixin selector - named - isColumnEnabled- Lnet/minecraft/world/chunk/light/LightStorage;isColumnEnabled(J)Z- intermediary - method_62873- Lnet/minecraft/class_3560;method_62873(J)Z- official - k- Leso;k(J)Z
 
- 
setRetainColumnpublic void setRetainColumn(long sectionPos, boolean retain) - Mappings:
- Namespace - Name - Mixin selector - named - setRetainColumn- Lnet/minecraft/world/chunk/light/LightStorage;setRetainColumn(JZ)V- intermediary - method_20600- Lnet/minecraft/class_3560;method_20600(JZ)V- official - c- Leso;c(JZ)V
 
- 
enqueueSectionData- Mappings:
- Namespace - Name - Mixin selector - named - enqueueSectionData- Lnet/minecraft/world/chunk/light/LightStorage;enqueueSectionData(JLnet/minecraft/world/chunk/ChunkNibbleArray;)V- intermediary - method_15532- Lnet/minecraft/class_3560;method_15532(JLnet/minecraft/class_2804;)V- official - a- Leso;a(JLdyy;)V
 
- 
setSectionStatusprotected void setSectionStatus(long sectionPos, boolean notReady) - Mappings:
- Namespace - Name - Mixin selector - named - setSectionStatus- Lnet/minecraft/world/chunk/light/LightStorage;setSectionStatus(JZ)V- intermediary - method_15526- Lnet/minecraft/class_3560;method_15526(JZ)V- official - d- Leso;d(JZ)V
 
- 
setSectionPropagationprotected void setSectionPropagation(long sectionPos, byte flags) - Mappings:
- Namespace - Name - Mixin selector - named - setSectionPropagation- Lnet/minecraft/world/chunk/light/LightStorage;setSectionPropagation(JB)V- intermediary - method_51546- Lnet/minecraft/class_3560;method_51546(JB)V- official - a- Leso;a(JB)V
 
- 
queueForUpdateprivate void queueForUpdate(long sectionPos) - Mappings:
- Namespace - Name - Mixin selector - named - queueForUpdate- Lnet/minecraft/world/chunk/light/LightStorage;queueForUpdate(J)V- intermediary - method_51550- Lnet/minecraft/class_3560;method_51550(J)V- official - m- Leso;m(J)V
 
- 
queueForRemovalprivate void queueForRemoval(long sectionPos) - Mappings:
- Namespace - Name - Mixin selector - named - queueForRemoval- Lnet/minecraft/world/chunk/light/LightStorage;queueForRemoval(J)V- intermediary - method_51551- Lnet/minecraft/class_3560;method_51551(J)V- official - n- Leso;n(J)V
 
- 
notifyChangesprotected void notifyChanges()- Mappings:
- Namespace - Name - Mixin selector - named - notifyChanges- Lnet/minecraft/world/chunk/light/LightStorage;notifyChanges()V- intermediary - method_15530- Lnet/minecraft/class_3560;method_15530()V- official - b- Leso;b()V
 
- 
getStatus- Mappings:
- Namespace - Name - Mixin selector - named - getStatus- Lnet/minecraft/world/chunk/light/LightStorage;getStatus(J)Lnet/minecraft/world/chunk/light/LightStorage$Status;- intermediary - method_51549- Lnet/minecraft/class_3560;method_51549(J)Lnet/minecraft/class_3560$class_8530;- official - l- Leso;l(J)Leso$b;
 
 
-