类 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>
-
- 直接已知子类:
BlockLightStorage,SkyLightStorage
public abstract class LightStorage<M extends ChunkToNibbleArrayMap<M>> extends SectionDistanceLevelPropagator
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.
- 另请参阅:
SkyLightStorage,BlockLightStorage- Mappings:
Namespace Name official ddiintermediary net/minecraft/class_3560named net/minecraft/world/chunk/light/LightStorage
-
-
字段概要
字段 修饰符和类型 字段 说明 private ChunkProviderchunkProviderprivate LongSetcolumnsToRetainprivate static Direction[]DIRECTIONSprotected LongSetdirtySectionsprotected static ChunkNibbleArrayEMPTYprotected static intfield_31710protected static intfield_31711protected static intfield_31712protected booleanhasLightUpdatesprivate LightTypelightTypeprotected LongSetmarkedNotReadySectionsprotected LongSetmarkedReadySectionsprotected LongSetnotifySectionsprivate LongSetqueuedEdgeSectionsprotected Long2ObjectMap<ChunkNibbleArray>queuedSectionsprotected LongSetreadySectionsprivate LongSetsectionsToRemoveprotected Mstorageprotected MuncachedStorage
-
构造器概要
构造器 限定符 构造器 说明 protectedLightStorage(LightType lightType, ChunkProvider chunkProvider, M lightData)
-
方法概要
所有方法 实例方法 抽象方法 具体方法 修饰符和类型 方法 说明 protected ChunkNibbleArraycreateSection(long sectionPos)protected voidenqueueSectionData(long sectionPos, @Nullable ChunkNibbleArray array, boolean bool)protected intget(long blockPos)protected intgetInitialLevel(long id)protected intgetLevel(long id)protected abstract intgetLight(long blockPos)@Nullable ChunkNibbleArraygetLightSection(long sectionPos)protected @Nullable ChunkNibbleArraygetLightSection(long sectionPos, boolean cached)protected @Nullable ChunkNibbleArraygetLightSection(M storage, long sectionPos)protected booleanhasLightUpdates()protected booleanhasSection(long sectionPos)protected voidnotifyChanges()protected voidonLoadSection(long sectionPos)protected voidonUnloadSection(long sectionPos)protected voidremoveSection(ChunkLightProvider<?,?> storage, long sectionPos)protected voidset(long blockPos, int value)protected voidsetColumnEnabled(long columnPos, boolean enabled)protected voidsetLevel(long id, int level)voidsetRetainColumn(long sectionPos, boolean retain)protected voidsetSectionStatus(long sectionPos, boolean notReady)protected voidupdateAll()protected voidupdateLight(ChunkLightProvider<M,?> lightProvider, boolean doSkylight, boolean skipEdgeLightPropagation)private voidupdateSection(ChunkLightProvider<M,?> lightProvider, long sectionPos)-
从类继承的方法 net.minecraft.world.SectionDistanceLevelPropagator
getPropagatedLevel, isMarker, propagateLevel, recalculateLevel, update
-
从类继承的方法 net.minecraft.world.chunk.light.LevelPropagator
applyPendingUpdates, getPendingUpdateCount, hasPendingUpdates, propagateLevel, removePendingUpdate, removePendingUpdateIf, resetLevel, updateLevel
-
-
-
-
字段详细资料
-
field_31710
protected static final int field_31710
- 另请参阅:
- 常量字段值
- Mappings:
Namespace Name Mixin selector official aLddi;a:Iintermediary field_31710Lnet/minecraft/class_3560;field_31710:Inamed field_31710Lnet/minecraft/world/chunk/light/LightStorage;field_31710:I
-
field_31711
protected static final int field_31711
- 另请参阅:
- 常量字段值
- Mappings:
Namespace Name Mixin selector official bLddi;b:Iintermediary field_31711Lnet/minecraft/class_3560;field_31711:Inamed field_31711Lnet/minecraft/world/chunk/light/LightStorage;field_31711:I
-
field_31712
protected static final int field_31712
- 另请参阅:
- 常量字段值
- Mappings:
Namespace Name Mixin selector official cLddi;c:Iintermediary field_31712Lnet/minecraft/class_3560;field_31712:Inamed field_31712Lnet/minecraft/world/chunk/light/LightStorage;field_31712:I
-
EMPTY
protected static final ChunkNibbleArray EMPTY
- Mappings:
Namespace Name Mixin selector official dLddi;d:Lclp;intermediary field_15801Lnet/minecraft/class_3560;field_15801:Lnet/minecraft/class_2804;named EMPTYLnet/minecraft/world/chunk/light/LightStorage;EMPTY:Lnet/minecraft/world/chunk/ChunkNibbleArray;
-
DIRECTIONS
private static final Direction[] DIRECTIONS
- Mappings:
Namespace Name Mixin selector official nLddi;n:[Lgg;intermediary field_15799Lnet/minecraft/class_3560;field_15799:[Lnet/minecraft/class_2350;named DIRECTIONSLnet/minecraft/world/chunk/light/LightStorage;DIRECTIONS:[Lnet/minecraft/util/math/Direction;
-
lightType
private final LightType lightType
- Mappings:
Namespace Name Mixin selector official oLddi;o:Lbwa;intermediary field_15805Lnet/minecraft/class_3560;field_15805:Lnet/minecraft/class_1944;named lightTypeLnet/minecraft/world/chunk/light/LightStorage;lightType:Lnet/minecraft/world/LightType;
-
chunkProvider
private final ChunkProvider chunkProvider
- Mappings:
Namespace Name Mixin selector official pLddi;p:Lclx;intermediary field_15803Lnet/minecraft/class_3560;field_15803:Lnet/minecraft/class_2823;named chunkProviderLnet/minecraft/world/chunk/light/LightStorage;chunkProvider:Lnet/minecraft/world/chunk/ChunkProvider;
-
readySections
protected final LongSet readySections
- Mappings:
Namespace Name Mixin selector official eLddi;e:Lit/unimi/dsi/fastutil/longs/LongSet;intermediary field_15808Lnet/minecraft/class_3560;field_15808:Lit/unimi/dsi/fastutil/longs/LongSet;named readySectionsLnet/minecraft/world/chunk/light/LightStorage;readySections:Lit/unimi/dsi/fastutil/longs/LongSet;
-
markedNotReadySections
protected final LongSet markedNotReadySections
- Mappings:
Namespace Name Mixin selector official fLddi;f:Lit/unimi/dsi/fastutil/longs/LongSet;intermediary field_15797Lnet/minecraft/class_3560;field_15797:Lit/unimi/dsi/fastutil/longs/LongSet;named markedNotReadySectionsLnet/minecraft/world/chunk/light/LightStorage;markedNotReadySections:Lit/unimi/dsi/fastutil/longs/LongSet;
-
markedReadySections
protected final LongSet markedReadySections
- Mappings:
Namespace Name Mixin selector official gLddi;g:Lit/unimi/dsi/fastutil/longs/LongSet;intermediary field_15804Lnet/minecraft/class_3560;field_15804:Lit/unimi/dsi/fastutil/longs/LongSet;named markedReadySectionsLnet/minecraft/world/chunk/light/LightStorage;markedReadySections:Lit/unimi/dsi/fastutil/longs/LongSet;
-
uncachedStorage
protected volatile M extends ChunkToNibbleArrayMap<M> uncachedStorage
- Mappings:
Namespace Name Mixin selector official hLddi;h:Lddd;intermediary field_15806Lnet/minecraft/class_3560;field_15806:Lnet/minecraft/class_3556;named uncachedStorageLnet/minecraft/world/chunk/light/LightStorage;uncachedStorage:Lnet/minecraft/world/chunk/ChunkToNibbleArrayMap;
-
storage
protected final M extends ChunkToNibbleArrayMap<M> storage
- Mappings:
Namespace Name Mixin selector official iLddi;i:Lddd;intermediary field_15796Lnet/minecraft/class_3560;field_15796:Lnet/minecraft/class_3556;named storageLnet/minecraft/world/chunk/light/LightStorage;storage:Lnet/minecraft/world/chunk/ChunkToNibbleArrayMap;
-
dirtySections
protected final LongSet dirtySections
- Mappings:
Namespace Name Mixin selector official jLddi;j:Lit/unimi/dsi/fastutil/longs/LongSet;intermediary field_15802Lnet/minecraft/class_3560;field_15802:Lit/unimi/dsi/fastutil/longs/LongSet;named dirtySectionsLnet/minecraft/world/chunk/light/LightStorage;dirtySections:Lit/unimi/dsi/fastutil/longs/LongSet;
-
notifySections
protected final LongSet notifySections
- Mappings:
Namespace Name Mixin selector official kLddi;k:Lit/unimi/dsi/fastutil/longs/LongSet;intermediary field_16448Lnet/minecraft/class_3560;field_16448:Lit/unimi/dsi/fastutil/longs/LongSet;named notifySectionsLnet/minecraft/world/chunk/light/LightStorage;notifySections:Lit/unimi/dsi/fastutil/longs/LongSet;
-
queuedSections
protected final Long2ObjectMap<ChunkNibbleArray> queuedSections
- Mappings:
Namespace Name Mixin selector official lLddi;l:Lit/unimi/dsi/fastutil/longs/Long2ObjectMap;intermediary field_15807Lnet/minecraft/class_3560;field_15807:Lit/unimi/dsi/fastutil/longs/Long2ObjectMap;named queuedSectionsLnet/minecraft/world/chunk/light/LightStorage;queuedSections:Lit/unimi/dsi/fastutil/longs/Long2ObjectMap;
-
queuedEdgeSections
private final LongSet queuedEdgeSections
- Mappings:
Namespace Name Mixin selector official qLddi;q:Lit/unimi/dsi/fastutil/longs/LongSet;intermediary field_25621Lnet/minecraft/class_3560;field_25621:Lit/unimi/dsi/fastutil/longs/LongSet;named queuedEdgeSectionsLnet/minecraft/world/chunk/light/LightStorage;queuedEdgeSections:Lit/unimi/dsi/fastutil/longs/LongSet;
-
columnsToRetain
private final LongSet columnsToRetain
- Mappings:
Namespace Name Mixin selector official rLddi;r:Lit/unimi/dsi/fastutil/longs/LongSet;intermediary field_19342Lnet/minecraft/class_3560;field_19342:Lit/unimi/dsi/fastutil/longs/LongSet;named columnsToRetainLnet/minecraft/world/chunk/light/LightStorage;columnsToRetain:Lit/unimi/dsi/fastutil/longs/LongSet;
-
sectionsToRemove
private final LongSet sectionsToRemove
- Mappings:
Namespace Name Mixin selector official sLddi;s:Lit/unimi/dsi/fastutil/longs/LongSet;intermediary field_15798Lnet/minecraft/class_3560;field_15798:Lit/unimi/dsi/fastutil/longs/LongSet;named sectionsToRemoveLnet/minecraft/world/chunk/light/LightStorage;sectionsToRemove:Lit/unimi/dsi/fastutil/longs/LongSet;
-
hasLightUpdates
protected volatile boolean hasLightUpdates
- Mappings:
Namespace Name Mixin selector official mLddi;m:Zintermediary field_15800Lnet/minecraft/class_3560;field_15800:Znamed hasLightUpdatesLnet/minecraft/world/chunk/light/LightStorage;hasLightUpdates:Z
-
-
构造器详细资料
-
LightStorage
protected LightStorage(LightType lightType, ChunkProvider chunkProvider, M lightData)
- Mappings:
Namespace Name Mixin selector official <init>Lddi;<init>(Lbwa;Lclx;Lddd;)Vintermediary <init>Lnet/minecraft/class_3560;<init>(Lnet/minecraft/class_1944;Lnet/minecraft/class_2823;Lnet/minecraft/class_3556;)Vnamed <init>Lnet/minecraft/world/chunk/light/LightStorage;<init>(Lnet/minecraft/world/LightType;Lnet/minecraft/world/chunk/ChunkProvider;Lnet/minecraft/world/chunk/ChunkToNibbleArrayMap;)V
-
-
方法详细资料
-
hasSection
protected boolean hasSection(long sectionPos)
- Mappings:
Namespace Name Mixin selector official gLddi;g(J)Zintermediary method_15524Lnet/minecraft/class_3560;method_15524(J)Znamed hasSectionLnet/minecraft/world/chunk/light/LightStorage;hasSection(J)Z
-
getLightSection
@Nullable protected @Nullable ChunkNibbleArray getLightSection(long sectionPos, boolean cached)
- Mappings:
Namespace Name Mixin selector official aLddi;a(JZ)Lclp;intermediary method_15522Lnet/minecraft/class_3560;method_15522(JZ)Lnet/minecraft/class_2804;named getLightSectionLnet/minecraft/world/chunk/light/LightStorage;getLightSection(JZ)Lnet/minecraft/world/chunk/ChunkNibbleArray;
-
getLightSection
@Nullable protected @Nullable ChunkNibbleArray getLightSection(M storage, long sectionPos)
- Mappings:
Namespace Name Mixin selector official aLddi;a(Lddd;J)Lclp;intermediary method_15533Lnet/minecraft/class_3560;method_15533(Lnet/minecraft/class_3556;J)Lnet/minecraft/class_2804;named getLightSectionLnet/minecraft/world/chunk/light/LightStorage;getLightSection(Lnet/minecraft/world/chunk/ChunkToNibbleArrayMap;J)Lnet/minecraft/world/chunk/ChunkNibbleArray;
-
getLightSection
@Nullable public @Nullable ChunkNibbleArray getLightSection(long sectionPos)
- Mappings:
Namespace Name Mixin selector official hLddi;h(J)Lclp;intermediary method_20533Lnet/minecraft/class_3560;method_20533(J)Lnet/minecraft/class_2804;named getLightSectionLnet/minecraft/world/chunk/light/LightStorage;getLightSection(J)Lnet/minecraft/world/chunk/ChunkNibbleArray;
-
getLight
protected abstract int getLight(long blockPos)
- Mappings:
Namespace Name Mixin selector official dLddi;d(J)Iintermediary method_15538Lnet/minecraft/class_3560;method_15538(J)Inamed getLightLnet/minecraft/world/chunk/light/LightStorage;getLight(J)I
-
get
protected int get(long blockPos)
- Mappings:
Namespace Name Mixin selector official iLddi;i(J)Iintermediary method_15537Lnet/minecraft/class_3560;method_15537(J)Inamed getLnet/minecraft/world/chunk/light/LightStorage;get(J)I
-
set
protected void set(long blockPos, int value)- Mappings:
Namespace Name Mixin selector official bLddi;b(JI)Vintermediary method_15525Lnet/minecraft/class_3560;method_15525(JI)Vnamed setLnet/minecraft/world/chunk/light/LightStorage;set(JI)V
-
getLevel
protected int getLevel(long id)
- 指定者:
getLevel在类中LevelPropagator- Mappings:
Namespace Name Mixin selector official cLdde;c(J)Iintermediary method_15480Lnet/minecraft/class_3554;method_15480(J)Inamed getLevelLnet/minecraft/world/chunk/light/LevelPropagator;getLevel(J)I
-
getInitialLevel
protected int getInitialLevel(long id)
- 指定者:
getInitialLevel在类中SectionDistanceLevelPropagator- Mappings:
Namespace Name Mixin selector official bLabf;b(J)Iintermediary method_18749Lnet/minecraft/class_4079;method_18749(J)Inamed getInitialLevelLnet/minecraft/world/SectionDistanceLevelPropagator;getInitialLevel(J)I
-
setLevel
protected void setLevel(long id, int level)- 指定者:
setLevel在类中LevelPropagator- Mappings:
Namespace Name Mixin selector official aLdde;a(JI)Vintermediary method_15485Lnet/minecraft/class_3554;method_15485(JI)Vnamed setLevelLnet/minecraft/world/chunk/light/LevelPropagator;setLevel(JI)V
-
createSection
protected ChunkNibbleArray createSection(long sectionPos)
- Mappings:
Namespace Name Mixin selector official jLddi;j(J)Lclp;intermediary method_15529Lnet/minecraft/class_3560;method_15529(J)Lnet/minecraft/class_2804;named createSectionLnet/minecraft/world/chunk/light/LightStorage;createSection(J)Lnet/minecraft/world/chunk/ChunkNibbleArray;
-
removeSection
protected void removeSection(ChunkLightProvider<?,?> storage, long sectionPos)
- Mappings:
Namespace Name Mixin selector official aLddi;a(Lddg;J)Vintermediary method_15536Lnet/minecraft/class_3560;method_15536(Lnet/minecraft/class_3558;J)Vnamed removeSectionLnet/minecraft/world/chunk/light/LightStorage;removeSection(Lnet/minecraft/world/chunk/light/ChunkLightProvider;J)V
-
hasLightUpdates
protected boolean hasLightUpdates()
- Mappings:
Namespace Name Mixin selector official aLddi;a()Zintermediary method_15528Lnet/minecraft/class_3560;method_15528()Znamed hasLightUpdatesLnet/minecraft/world/chunk/light/LightStorage;hasLightUpdates()Z
-
updateLight
protected void updateLight(ChunkLightProvider<M,?> lightProvider, boolean doSkylight, boolean skipEdgeLightPropagation)
- Mappings:
Namespace Name Mixin selector official aLddi;a(Lddg;ZZ)Vintermediary method_15527Lnet/minecraft/class_3560;method_15527(Lnet/minecraft/class_3558;ZZ)Vnamed updateLightLnet/minecraft/world/chunk/light/LightStorage;updateLight(Lnet/minecraft/world/chunk/light/ChunkLightProvider;ZZ)V
-
updateSection
private void updateSection(ChunkLightProvider<M,?> lightProvider, long sectionPos)
- Mappings:
Namespace Name Mixin selector official bLddi;b(Lddg;J)Vintermediary method_29967Lnet/minecraft/class_3560;method_29967(Lnet/minecraft/class_3558;J)Vnamed updateSectionLnet/minecraft/world/chunk/light/LightStorage;updateSection(Lnet/minecraft/world/chunk/light/ChunkLightProvider;J)V
-
onLoadSection
protected void onLoadSection(long sectionPos)
- Mappings:
Namespace Name Mixin selector official kLddi;k(J)Vintermediary method_15523Lnet/minecraft/class_3560;method_15523(J)Vnamed onLoadSectionLnet/minecraft/world/chunk/light/LightStorage;onLoadSection(J)V
-
onUnloadSection
protected void onUnloadSection(long sectionPos)
- Mappings:
Namespace Name Mixin selector official lLddi;l(J)Vintermediary method_15534Lnet/minecraft/class_3560;method_15534(J)Vnamed onUnloadSectionLnet/minecraft/world/chunk/light/LightStorage;onUnloadSection(J)V
-
setColumnEnabled
protected void setColumnEnabled(long columnPos, boolean enabled)- Mappings:
Namespace Name Mixin selector official bLddi;b(JZ)Vintermediary method_15535Lnet/minecraft/class_3560;method_15535(JZ)Vnamed setColumnEnabledLnet/minecraft/world/chunk/light/LightStorage;setColumnEnabled(JZ)V
-
setRetainColumn
public void setRetainColumn(long sectionPos, boolean retain)- Mappings:
Namespace Name Mixin selector official cLddi;c(JZ)Vintermediary method_20600Lnet/minecraft/class_3560;method_20600(JZ)Vnamed setRetainColumnLnet/minecraft/world/chunk/light/LightStorage;setRetainColumn(JZ)V
-
enqueueSectionData
protected void enqueueSectionData(long sectionPos, @Nullable @Nullable ChunkNibbleArray array, boolean bool)- Mappings:
Namespace Name Mixin selector official aLddi;a(JLclp;Z)Vintermediary method_15532Lnet/minecraft/class_3560;method_15532(JLnet/minecraft/class_2804;Z)Vnamed enqueueSectionDataLnet/minecraft/world/chunk/light/LightStorage;enqueueSectionData(JLnet/minecraft/world/chunk/ChunkNibbleArray;Z)V
-
setSectionStatus
protected void setSectionStatus(long sectionPos, boolean notReady)- Mappings:
Namespace Name Mixin selector official dLddi;d(JZ)Vintermediary method_15526Lnet/minecraft/class_3560;method_15526(JZ)Vnamed setSectionStatusLnet/minecraft/world/chunk/light/LightStorage;setSectionStatus(JZ)V
-
updateAll
protected void updateAll()
- Mappings:
Namespace Name Mixin selector official dLddi;d()Vintermediary method_15539Lnet/minecraft/class_3560;method_15539()Vnamed updateAllLnet/minecraft/world/chunk/light/LightStorage;updateAll()V
-
notifyChanges
protected void notifyChanges()
- Mappings:
Namespace Name Mixin selector official eLddi;e()Vintermediary method_15530Lnet/minecraft/class_3560;method_15530()Vnamed notifyChangesLnet/minecraft/world/chunk/light/LightStorage;notifyChanges()V
-
-