Class SkyLightEngine
java.lang.Object
net.minecraft.world.level.lighting.LightEngine<SkyLightSectionStorage.SkyDataLayerStorageMap,SkyLightSectionStorage>
net.minecraft.world.level.lighting.SkyLightEngine
- All Implemented Interfaces:
LayerLightEventListener,LightEventListener
public final class SkyLightEngine
extends LightEngine<SkyLightSectionStorage.SkyDataLayerStorageMap,SkyLightSectionStorage>
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.level.lighting.LightEngine
LightEngine.QueueEntryNested classes/interfaces inherited from interface net.minecraft.world.level.lighting.LayerLightEventListener
LayerLightEventListener.DummyLightLayerEventListener -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final longprivate final ChunkSkyLightSourcesprivate final BlockPos.MutableBlockPosprivate static final longprivate static final longFields inherited from class net.minecraft.world.level.lighting.LightEngine
chunkSource, MAX_LEVEL, MIN_OPACITY, PROPAGATION_DIRECTIONS, PULL_LIGHT_IN_ENTRY, storage -
Constructor Summary
ConstructorsModifierConstructorDescriptionSkyLightEngine(LightChunkGetter pChunkSource) protectedSkyLightEngine(LightChunkGetter pChunkSource, SkyLightSectionStorage pSectionStorage) -
Method Summary
Modifier and TypeMethodDescriptionprivate voidaddSourcesAbove(int pX, int pZ, int pMaxY, int pBottomSectionY) protected voidcheckNode(long pLevelPos) private intcountEmptySectionsBelowIfAtBorder(long pPackedPos) private static booleancrossedSectionEdge(Direction pDirection, int pX, int pZ) private ChunkSkyLightSourcesgetChunkSources(int pChunkX, int pChunkZ) private intgetLowestSourceY(int pX, int pZ, int pDefaultReturnValue) private static booleanisSourceLevel(int pLevel) protected voidpropagateDecrease(long p_285015_, long p_285395_) private voidpropagateFromEmptySections(long pPackedPos, Direction pDirection, int pLevel, boolean pShouldIncrease, int pEmptySections) protected voidpropagateIncrease(long p_285341_, long p_285204_, int p_285003_) voidpropagateLightSources(ChunkPos p_285333_) private voidremoveSourcesBelow(int pX, int pZ, int pMinY, int pBottomSectionY) voidsetLightEnabled(ChunkPos p_285459_, boolean p_285013_) private voidupdateSourcesInColumn(int pX, int pZ, int pLowestY) Methods inherited from class net.minecraft.world.level.lighting.LightEngine
checkBlock, enqueueDecrease, enqueueIncrease, getChunk, getDataLayerData, getDebugData, getDebugSectionType, getLightBlockInto, getLightValue, getOcclusionShape, getOpacity, getState, hasDifferentLightProperties, hasDifferentLightProperties, hasLightWork, isEmptyShape, queueSectionData, retainData, runLightUpdates, shapeOccludes, updateSectionStatusMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.world.level.lighting.LightEventListener
updateSectionStatus
-
Field Details
-
REMOVE_TOP_SKY_SOURCE_ENTRY
private static final long REMOVE_TOP_SKY_SOURCE_ENTRY -
REMOVE_SKY_SOURCE_ENTRY
private static final long REMOVE_SKY_SOURCE_ENTRY -
ADD_SKY_SOURCE_ENTRY
private static final long ADD_SKY_SOURCE_ENTRY -
mutablePos
-
emptyChunkSources
-
-
Constructor Details
-
SkyLightEngine
-
SkyLightEngine
@VisibleForTesting protected SkyLightEngine(LightChunkGetter pChunkSource, SkyLightSectionStorage pSectionStorage)
-
-
Method Details
-
isSourceLevel
private static boolean isSourceLevel(int pLevel) -
getLowestSourceY
private int getLowestSourceY(int pX, int pZ, int pDefaultReturnValue) -
getChunkSources
-
checkNode
protected void checkNode(long pLevelPos) - Specified by:
checkNodein classLightEngine<SkyLightSectionStorage.SkyDataLayerStorageMap,SkyLightSectionStorage>
-
updateSourcesInColumn
private void updateSourcesInColumn(int pX, int pZ, int pLowestY) -
removeSourcesBelow
private void removeSourcesBelow(int pX, int pZ, int pMinY, int pBottomSectionY) -
addSourcesAbove
private void addSourcesAbove(int pX, int pZ, int pMaxY, int pBottomSectionY) -
propagateIncrease
protected void propagateIncrease(long p_285341_, long p_285204_, int p_285003_) - Specified by:
propagateIncreasein classLightEngine<SkyLightSectionStorage.SkyDataLayerStorageMap,SkyLightSectionStorage>
-
propagateDecrease
protected void propagateDecrease(long p_285015_, long p_285395_) - Specified by:
propagateDecreasein classLightEngine<SkyLightSectionStorage.SkyDataLayerStorageMap,SkyLightSectionStorage>
-
countEmptySectionsBelowIfAtBorder
private int countEmptySectionsBelowIfAtBorder(long pPackedPos) -
propagateFromEmptySections
private void propagateFromEmptySections(long pPackedPos, Direction pDirection, int pLevel, boolean pShouldIncrease, int pEmptySections) -
crossedSectionEdge
-
setLightEnabled
- Specified by:
setLightEnabledin interfaceLightEventListener- Overrides:
setLightEnabledin classLightEngine<SkyLightSectionStorage.SkyDataLayerStorageMap,SkyLightSectionStorage>
-
propagateLightSources
-