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.QueueEntry
Nested classes/interfaces inherited from interface net.minecraft.world.level.lighting.LayerLightEventListener
LayerLightEventListener.DummyLightLayerEventListener
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final long
private final ChunkSkyLightSources
private final BlockPos.MutableBlockPos
private static final long
private static final long
Fields inherited from class net.minecraft.world.level.lighting.LightEngine
chunkSource, MAX_LEVEL, MIN_OPACITY, PROPAGATION_DIRECTIONS, PULL_LIGHT_IN_ENTRY, storage
-
Constructor Summary
ModifierConstructorDescriptionSkyLightEngine
(LightChunkGetter p_75843_) protected
SkyLightEngine
(LightChunkGetter p_282215_, SkyLightSectionStorage p_282341_) -
Method Summary
Modifier and TypeMethodDescriptionprivate void
addSourcesAbove
(int p_285241_, int p_285212_, int p_284972_, int p_285134_) protected void
checkNode
(long p_75859_) private int
countEmptySectionsBelowIfAtBorder
(long p_285356_) private static boolean
crossedSectionEdge
(Direction p_285014_, int p_284991_, int p_285468_) private ChunkSkyLightSources
getChunkSources
(int p_285270_, int p_285307_) private int
getLowestSourceY
(int p_285058_, int p_285191_, int p_285111_) private static boolean
isSourceLevel
(int p_285004_) protected void
propagateDecrease
(long p_285015_, long p_285395_) private void
propagateFromEmptySections
(long p_284965_, Direction p_285308_, int p_284977_, boolean p_285001_, int p_285052_) protected void
propagateIncrease
(long p_285341_, long p_285204_, int p_285003_) void
propagateLightSources
(ChunkPos p_285333_) private void
removeSourcesBelow
(int p_285475_, int p_285138_, int p_285130_, int p_285112_) void
setLightEnabled
(ChunkPos p_285459_, boolean p_285013_) private void
updateSourcesInColumn
(int p_285053_, int p_285140_, int p_285337_) Methods inherited from class net.minecraft.world.level.lighting.LightEngine
checkBlock, enqueueDecrease, enqueueIncrease, getChunk, getDataLayerData, getDebugData, getDebugSectionType, getLightBlockInto, getLightValue, getOcclusionShape, getOcclusionShape, getOpacity, getState, hasDifferentLightProperties, hasLightWork, isEmptyShape, queueSectionData, retainData, runLightUpdates, shapeOccludes, updateSectionStatus
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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 p_282215_, SkyLightSectionStorage p_282341_)
-
-
Method Details
-
isSourceLevel
private static boolean isSourceLevel(int p_285004_) -
getLowestSourceY
private int getLowestSourceY(int p_285058_, int p_285191_, int p_285111_) -
getChunkSources
-
checkNode
protected void checkNode(long p_75859_) - Specified by:
checkNode
in classLightEngine<SkyLightSectionStorage.SkyDataLayerStorageMap,
SkyLightSectionStorage>
-
updateSourcesInColumn
private void updateSourcesInColumn(int p_285053_, int p_285140_, int p_285337_) -
removeSourcesBelow
private void removeSourcesBelow(int p_285475_, int p_285138_, int p_285130_, int p_285112_) -
addSourcesAbove
private void addSourcesAbove(int p_285241_, int p_285212_, int p_284972_, int p_285134_) -
propagateIncrease
protected void propagateIncrease(long p_285341_, long p_285204_, int p_285003_) - Specified by:
propagateIncrease
in classLightEngine<SkyLightSectionStorage.SkyDataLayerStorageMap,
SkyLightSectionStorage>
-
propagateDecrease
protected void propagateDecrease(long p_285015_, long p_285395_) - Specified by:
propagateDecrease
in classLightEngine<SkyLightSectionStorage.SkyDataLayerStorageMap,
SkyLightSectionStorage>
-
countEmptySectionsBelowIfAtBorder
private int countEmptySectionsBelowIfAtBorder(long p_285356_) -
propagateFromEmptySections
private void propagateFromEmptySections(long p_284965_, Direction p_285308_, int p_284977_, boolean p_285001_, int p_285052_) -
crossedSectionEdge
-
setLightEnabled
- Specified by:
setLightEnabled
in interfaceLightEventListener
- Overrides:
setLightEnabled
in classLightEngine<SkyLightSectionStorage.SkyDataLayerStorageMap,
SkyLightSectionStorage>
-
propagateLightSources
-