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 chunkSource) protectedSkyLightEngine(LightChunkGetter chunkSource, SkyLightSectionStorage sectionStorage) -
Method Summary
Modifier and TypeMethodDescriptionprivate voidaddSourcesAbove(int x, int z, int maxY, int bottomSectionY) protected voidcheckNode(long levelPos) private intcountEmptySectionsBelowIfAtBorder(long packedPos) private static booleancrossedSectionEdge(Direction direction, int x, int z) private ChunkSkyLightSourcesgetChunkSources(int chunkX, int chunkZ) private intgetLowestSourceY(int x, int z, int defaultReturnValue) private static booleanisSourceLevel(int level) protected voidpropagateDecrease(long packedPos, long lightLevel) private voidpropagateFromEmptySections(long packedPos, Direction direction, int level, boolean shouldIncrease, int emptySections) protected voidpropagateIncrease(long packedPos, long queueEntry, int lightLevel) voidpropagateLightSources(ChunkPos chunkPos) private voidremoveSourcesBelow(int x, int z, int minY, int bottomSectionY) voidsetLightEnabled(ChunkPos chunkPos, boolean lightEnabled) private voidupdateSourcesInColumn(int x, int z, int lowestY) 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, 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 chunkSource, SkyLightSectionStorage sectionStorage)
-
-
Method Details
-
isSourceLevel
private static boolean isSourceLevel(int level) -
getLowestSourceY
private int getLowestSourceY(int x, int z, int defaultReturnValue) -
getChunkSources
-
checkNode
protected void checkNode(long levelPos) - Specified by:
checkNodein classLightEngine<SkyLightSectionStorage.SkyDataLayerStorageMap,SkyLightSectionStorage>
-
updateSourcesInColumn
private void updateSourcesInColumn(int x, int z, int lowestY) -
removeSourcesBelow
private void removeSourcesBelow(int x, int z, int minY, int bottomSectionY) -
addSourcesAbove
private void addSourcesAbove(int x, int z, int maxY, int bottomSectionY) -
propagateIncrease
protected void propagateIncrease(long packedPos, long queueEntry, int lightLevel) - Specified by:
propagateIncreasein classLightEngine<SkyLightSectionStorage.SkyDataLayerStorageMap,SkyLightSectionStorage>
-
propagateDecrease
protected void propagateDecrease(long packedPos, long lightLevel) - Specified by:
propagateDecreasein classLightEngine<SkyLightSectionStorage.SkyDataLayerStorageMap,SkyLightSectionStorage>
-
countEmptySectionsBelowIfAtBorder
private int countEmptySectionsBelowIfAtBorder(long packedPos) -
propagateFromEmptySections
private void propagateFromEmptySections(long packedPos, Direction direction, int level, boolean shouldIncrease, int emptySections) -
crossedSectionEdge
-
setLightEnabled
- Specified by:
setLightEnabledin interfaceLightEventListener- Overrides:
setLightEnabledin classLightEngine<SkyLightSectionStorage.SkyDataLayerStorageMap,SkyLightSectionStorage>
-
propagateLightSources
-