Package net.minecraft.world.chunk.light
Class ChunkLightProvider<M extends ChunkToNibbleArrayMap<M>,S extends LightStorage<M>>
java.lang.Object
net.minecraft.world.chunk.light.LevelPropagator
net.minecraft.world.chunk.light.ChunkLightProvider<M,S>
- All Implemented Interfaces:
ChunkLightingView,LightingView
- Direct Known Subclasses:
ChunkBlockLightProvider,ChunkSkyLightProvider
public abstract class ChunkLightProvider<M extends ChunkToNibbleArrayMap<M>,S extends LightStorage<M>> extends LevelPropagator implements ChunkLightingView
- Mappings:
Namespace Name official dahintermediary net/minecraft/class_3558named net/minecraft/world/chunk/light/ChunkLightProvider
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.world.chunk.light.ChunkLightingView
ChunkLightingView.Empty -
Field Summary
Fields Modifier and Type Field Description private long[]cachedChunkPositionsprivate BlockView[]cachedChunksprotected ChunkProviderchunkProviderprivate static Direction[]DIRECTIONSprivate booleanfield_15794protected SlightStorageprotected BlockPos.MutablereusableBlockPosprotected LightTypetype -
Constructor Summary
Constructors Constructor Description ChunkLightProvider(ChunkProvider chunkProvider, LightType type, S lightStorage) -
Method Summary
Modifier and Type Method Description voidaddLightSource(BlockPos pos, int level)voidcheckBlock(BlockPos pos)private voidclearChunkCache()StringdisplaySectionLevel(long sectionPos)intdoLightUpdates(int maxSteps, boolean doSkylight, boolean skipEdgeLightPropagation)protected voidenqueueSectionData(long sectionPos, ChunkNibbleArray lightArray, boolean bool)private BlockViewgetChunk(int chunkX, int chunkZ)protected intgetCurrentLevelFromSection(ChunkNibbleArray section, long blockPos)protected intgetLevel(long id)intgetLightLevel(BlockPos pos)ChunkNibbleArraygetLightSection(ChunkSectionPos pos)protected VoxelShapegetOpaqueShape(BlockState world, long pos, Direction facing)protected intgetPropagatedLevel(long sourceId, long targetId, int level)static intgetRealisticOpacity(BlockView world, BlockState state1, BlockPos pos1, BlockState state2, BlockPos pos2, Direction direction, int opacity2)protected BlockStategetStateForLighting(long pos, MutableInt mutableInt)booleanhasUpdates()protected booleanisMarker(long id)protected intrecalculateLevel(long id, long excludedId, int maxLevel)protected voidresetLevel(long id)voidsetColumnEnabled(ChunkPos pos, boolean enabled)protected voidsetLevel(long id, int level)voidsetRetainColumn(ChunkPos pos, boolean retainData)voidsetSectionStatus(ChunkSectionPos pos, boolean notReady)Methods inherited from class net.minecraft.world.chunk.light.LevelPropagator
applyPendingUpdates, getPendingUpdateCount, hasPendingUpdates, propagateLevel, propagateLevel, removePendingUpdate, removePendingUpdateIf, updateLevelMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.world.chunk.light.LightingView
setSectionStatus
-
Field Details
-
DIRECTIONS
- Mappings:
Namespace Name Mixin selector official eLdah;e:[Lgc;intermediary field_16513Lnet/minecraft/class_3558;field_16513:[Lnet/minecraft/class_2350;named DIRECTIONSLnet/minecraft/world/chunk/light/ChunkLightProvider;DIRECTIONS:[Lnet/minecraft/util/math/Direction;
-
chunkProvider
- Mappings:
Namespace Name Mixin selector official aLdah;a:Lcka;intermediary field_15795Lnet/minecraft/class_3558;field_15795:Lnet/minecraft/class_2823;named chunkProviderLnet/minecraft/world/chunk/light/ChunkLightProvider;chunkProvider:Lnet/minecraft/world/chunk/ChunkProvider;
-
type
- Mappings:
Namespace Name Mixin selector official bLdah;b:Lbug;intermediary field_15792Lnet/minecraft/class_3558;field_15792:Lnet/minecraft/class_1944;named typeLnet/minecraft/world/chunk/light/ChunkLightProvider;type:Lnet/minecraft/world/LightType;
-
lightStorage
- Mappings:
Namespace Name Mixin selector official cLdah;c:Ldaj;intermediary field_15793Lnet/minecraft/class_3558;field_15793:Lnet/minecraft/class_3560;named lightStorageLnet/minecraft/world/chunk/light/ChunkLightProvider;lightStorage:Lnet/minecraft/world/chunk/light/LightStorage;
-
field_15794
private boolean field_15794- Mappings:
Namespace Name Mixin selector official fLdah;f:Zintermediary field_15794Lnet/minecraft/class_3558;field_15794:Znamed field_15794Lnet/minecraft/world/chunk/light/ChunkLightProvider;field_15794:Z
-
reusableBlockPos
- Mappings:
Namespace Name Mixin selector official dLdah;d:Lfx$a;intermediary field_19284Lnet/minecraft/class_3558;field_19284:Lnet/minecraft/class_2338$class_2339;named reusableBlockPosLnet/minecraft/world/chunk/light/ChunkLightProvider;reusableBlockPos:Lnet/minecraft/util/math/BlockPos$Mutable;
-
cachedChunkPositions
private final long[] cachedChunkPositions- Mappings:
Namespace Name Mixin selector official gLdah;g:[Jintermediary field_17397Lnet/minecraft/class_3558;field_17397:[Jnamed cachedChunkPositionsLnet/minecraft/world/chunk/light/ChunkLightProvider;cachedChunkPositions:[J
-
cachedChunks
- Mappings:
Namespace Name Mixin selector official hLdah;h:[Lbtb;intermediary field_17398Lnet/minecraft/class_3558;field_17398:[Lnet/minecraft/class_1922;named cachedChunksLnet/minecraft/world/chunk/light/ChunkLightProvider;cachedChunks:[Lnet/minecraft/world/BlockView;
-
-
Constructor Details
-
ChunkLightProvider
- Mappings:
Namespace Name Mixin selector official <init>Ldah;<init>(Lcka;Lbug;Ldaj;)Vintermediary <init>Lnet/minecraft/class_3558;<init>(Lnet/minecraft/class_2823;Lnet/minecraft/class_1944;Lnet/minecraft/class_3560;)Vnamed <init>Lnet/minecraft/world/chunk/light/ChunkLightProvider;<init>(Lnet/minecraft/world/chunk/ChunkProvider;Lnet/minecraft/world/LightType;Lnet/minecraft/world/chunk/light/LightStorage;)V
-
-
Method Details
-
resetLevel
protected void resetLevel(long id)- Overrides:
resetLevelin classLevelPropagator- Mappings:
Namespace Name Mixin selector official fLdaf;f(J)Vintermediary method_15491Lnet/minecraft/class_3554;method_15491(J)Vnamed resetLevelLnet/minecraft/world/chunk/light/LevelPropagator;resetLevel(J)V
-
getChunk
- Mappings:
Namespace Name Mixin selector official aLdah;a(II)Lbtb;intermediary method_17529Lnet/minecraft/class_3558;method_17529(II)Lnet/minecraft/class_1922;named getChunkLnet/minecraft/world/chunk/light/ChunkLightProvider;getChunk(II)Lnet/minecraft/world/BlockView;
-
clearChunkCache
private void clearChunkCache()- Mappings:
Namespace Name Mixin selector official dLdah;d()Vintermediary method_17530Lnet/minecraft/class_3558;method_17530()Vnamed clearChunkCacheLnet/minecraft/world/chunk/light/ChunkLightProvider;clearChunkCache()V
-
getStateForLighting
- Mappings:
Namespace Name Mixin selector official aLdah;a(JLorg/apache/commons/lang3/mutable/MutableInt;)Lchv;intermediary method_20479Lnet/minecraft/class_3558;method_20479(JLorg/apache/commons/lang3/mutable/MutableInt;)Lnet/minecraft/class_2680;named getStateForLightingLnet/minecraft/world/chunk/light/ChunkLightProvider;getStateForLighting(JLorg/apache/commons/lang3/mutable/MutableInt;)Lnet/minecraft/block/BlockState;
-
getOpaqueShape
- Mappings:
Namespace Name Mixin selector official aLdah;a(Lchv;JLgc;)Ldjv;intermediary method_20710Lnet/minecraft/class_3558;method_20710(Lnet/minecraft/class_2680;JLnet/minecraft/class_2350;)Lnet/minecraft/class_265;named getOpaqueShapeLnet/minecraft/world/chunk/light/ChunkLightProvider;getOpaqueShape(Lnet/minecraft/block/BlockState;JLnet/minecraft/util/math/Direction;)Lnet/minecraft/util/shape/VoxelShape;
-
getRealisticOpacity
public static int getRealisticOpacity(BlockView world, BlockState state1, BlockPos pos1, BlockState state2, BlockPos pos2, Direction direction, int opacity2)- Mappings:
Namespace Name Mixin selector official aLdah;a(Lbtb;Lchv;Lfx;Lchv;Lfx;Lgc;I)Iintermediary method_20049Lnet/minecraft/class_3558;method_20049(Lnet/minecraft/class_1922;Lnet/minecraft/class_2680;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;Lnet/minecraft/class_2338;Lnet/minecraft/class_2350;I)Inamed getRealisticOpacityLnet/minecraft/world/chunk/light/ChunkLightProvider;getRealisticOpacity(Lnet/minecraft/world/BlockView;Lnet/minecraft/block/BlockState;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/Direction;I)I
-
isMarker
protected boolean isMarker(long id)- Specified by:
isMarkerin classLevelPropagator- Mappings:
Namespace Name Mixin selector official aLdaf;a(J)Zintermediary method_15494Lnet/minecraft/class_3554;method_15494(J)Znamed isMarkerLnet/minecraft/world/chunk/light/LevelPropagator;isMarker(J)Z
-
recalculateLevel
protected int recalculateLevel(long id, long excludedId, int maxLevel)- Specified by:
recalculateLevelin classLevelPropagator- Mappings:
Namespace Name Mixin selector official aLdaf;a(JJI)Iintermediary method_15486Lnet/minecraft/class_3554;method_15486(JJI)Inamed recalculateLevelLnet/minecraft/world/chunk/light/LevelPropagator;recalculateLevel(JJI)I
-
getLevel
protected int getLevel(long id)- Specified by:
getLevelin classLevelPropagator- Mappings:
Namespace Name Mixin selector official cLdaf;c(J)Iintermediary method_15480Lnet/minecraft/class_3554;method_15480(J)Inamed getLevelLnet/minecraft/world/chunk/light/LevelPropagator;getLevel(J)I
-
getCurrentLevelFromSection
- Mappings:
Namespace Name Mixin selector official aLdah;a(Lcjs;J)Iintermediary method_15517Lnet/minecraft/class_3558;method_15517(Lnet/minecraft/class_2804;J)Inamed getCurrentLevelFromSectionLnet/minecraft/world/chunk/light/ChunkLightProvider;getCurrentLevelFromSection(Lnet/minecraft/world/chunk/ChunkNibbleArray;J)I
-
setLevel
protected void setLevel(long id, int level)- Specified by:
setLevelin classLevelPropagator- Mappings:
Namespace Name Mixin selector official aLdaf;a(JI)Vintermediary method_15485Lnet/minecraft/class_3554;method_15485(JI)Vnamed setLevelLnet/minecraft/world/chunk/light/LevelPropagator;setLevel(JI)V
-
getPropagatedLevel
protected int getPropagatedLevel(long sourceId, long targetId, int level)- Specified by:
getPropagatedLevelin classLevelPropagator- Mappings:
Namespace Name Mixin selector official bLdaf;b(JJI)Iintermediary method_15488Lnet/minecraft/class_3554;method_15488(JJI)Inamed getPropagatedLevelLnet/minecraft/world/chunk/light/LevelPropagator;getPropagatedLevel(JJI)I
-
hasUpdates
public boolean hasUpdates()- Mappings:
Namespace Name Mixin selector official aLdah;a()Zintermediary method_15518Lnet/minecraft/class_3558;method_15518()Znamed hasUpdatesLnet/minecraft/world/chunk/light/ChunkLightProvider;hasUpdates()Z
-
doLightUpdates
public int doLightUpdates(int maxSteps, boolean doSkylight, boolean skipEdgeLightPropagation)- Mappings:
Namespace Name Mixin selector official aLdah;a(IZZ)Iintermediary method_15516Lnet/minecraft/class_3558;method_15516(IZZ)Inamed doLightUpdatesLnet/minecraft/world/chunk/light/ChunkLightProvider;doLightUpdates(IZZ)I
-
enqueueSectionData
protected void enqueueSectionData(long sectionPos, @Nullable ChunkNibbleArray lightArray, boolean bool)- Mappings:
Namespace Name Mixin selector official aLdah;a(JLcjs;Z)Vintermediary method_15515Lnet/minecraft/class_3558;method_15515(JLnet/minecraft/class_2804;Z)Vnamed enqueueSectionDataLnet/minecraft/world/chunk/light/ChunkLightProvider;enqueueSectionData(JLnet/minecraft/world/chunk/ChunkNibbleArray;Z)V
-
getLightSection
- Specified by:
getLightSectionin interfaceChunkLightingView- Mappings:
Namespace Name Mixin selector official aLdai;a(Lgq;)Lcjs;intermediary method_15544Lnet/minecraft/class_3562;method_15544(Lnet/minecraft/class_4076;)Lnet/minecraft/class_2804;named getLightSectionLnet/minecraft/world/chunk/light/ChunkLightingView;getLightSection(Lnet/minecraft/util/math/ChunkSectionPos;)Lnet/minecraft/world/chunk/ChunkNibbleArray;
-
getLightLevel
- Specified by:
getLightLevelin interfaceChunkLightingView- Mappings:
Namespace Name Mixin selector official bLdai;b(Lfx;)Iintermediary method_15543Lnet/minecraft/class_3562;method_15543(Lnet/minecraft/class_2338;)Inamed getLightLevelLnet/minecraft/world/chunk/light/ChunkLightingView;getLightLevel(Lnet/minecraft/util/math/BlockPos;)I
-
displaySectionLevel
- Mappings:
Namespace Name Mixin selector official bLdah;b(J)Ljava/lang/String;intermediary method_22875Lnet/minecraft/class_3558;method_22875(J)Ljava/lang/String;named displaySectionLevelLnet/minecraft/world/chunk/light/ChunkLightProvider;displaySectionLevel(J)Ljava/lang/String;
-
checkBlock
- Mappings:
Namespace Name Mixin selector official aLdah;a(Lfx;)Vintermediary method_15513Lnet/minecraft/class_3558;method_15513(Lnet/minecraft/class_2338;)Vnamed checkBlockLnet/minecraft/world/chunk/light/ChunkLightProvider;checkBlock(Lnet/minecraft/util/math/BlockPos;)V
-
addLightSource
- Mappings:
Namespace Name Mixin selector official aLdah;a(Lfx;I)Vintermediary method_15514Lnet/minecraft/class_3558;method_15514(Lnet/minecraft/class_2338;I)Vnamed addLightSourceLnet/minecraft/world/chunk/light/ChunkLightProvider;addLightSource(Lnet/minecraft/util/math/BlockPos;I)V
-
setSectionStatus
- Specified by:
setSectionStatusin interfaceLightingView- Mappings:
Namespace Name Mixin selector official aLdal;a(Lgq;Z)Vintermediary method_15551Lnet/minecraft/class_3565;method_15551(Lnet/minecraft/class_4076;Z)Vnamed setSectionStatusLnet/minecraft/world/chunk/light/LightingView;setSectionStatus(Lnet/minecraft/util/math/ChunkSectionPos;Z)V
-
setColumnEnabled
- Mappings:
Namespace Name Mixin selector official aLdah;a(Lbtc;Z)Vintermediary method_15512Lnet/minecraft/class_3558;method_15512(Lnet/minecraft/class_1923;Z)Vnamed setColumnEnabledLnet/minecraft/world/chunk/light/ChunkLightProvider;setColumnEnabled(Lnet/minecraft/util/math/ChunkPos;Z)V
-
setRetainColumn
- Mappings:
Namespace Name Mixin selector official bLdah;b(Lbtc;Z)Vintermediary method_20599Lnet/minecraft/class_3558;method_20599(Lnet/minecraft/class_1923;Z)Vnamed setRetainColumnLnet/minecraft/world/chunk/light/ChunkLightProvider;setRetainColumn(Lnet/minecraft/util/math/ChunkPos;Z)V
-