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 LightEngine
LightEngine.QueueEntryNested classes/interfaces inherited from interface 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 LightEngine
chunkSource, MAX_LEVEL, MIN_OPACITY, PROPAGATION_DIRECTIONS, PULL_LIGHT_IN_ENTRY, storage -
Constructor Summary
ConstructorsModifierConstructorDescriptionSkyLightEngine(LightChunkGetter chunkSource) protectedSkyLightEngine(LightChunkGetter chunkSource, SkyLightSectionStorage storage) -
Method Summary
Modifier and TypeMethodDescriptionprivate voidaddSourcesAbove(int x, int z, int lowestSourceY, int worldBottomY) protected voidcheckNode(long blockNode) private intcountEmptySectionsBelowIfAtBorder(long blockNode) private static booleancrossedSectionEdge(Direction propagationDirection, int x, int z) private @Nullable ChunkSkyLightSourcesgetChunkSources(int chunkX, int chunkZ) private intgetLowestSourceY(int x, int z, int defaultValue) private static booleanisSourceLevel(int value) protected voidpropagateDecrease(long fromNode, long decreaseData) private voidpropagateFromEmptySections(long toNode, Direction propagationDirection, int toLevel, boolean increase, int emptySectionsBelow) protected voidpropagateIncrease(long fromNode, long increaseData, int fromLevel) voidprivate voidremoveSourcesBelow(int x, int z, int lowestSourceY, int worldBottomY) voidsetLightEnabled(ChunkPos pos, boolean enable) private voidupdateSourcesInColumn(int x, int z, int lowestSourceY) Methods inherited from class 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 Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface 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
-
-
Method Details
-
isSourceLevel
private static boolean isSourceLevel(int value) -
getLowestSourceY
private int getLowestSourceY(int x, int z, int defaultValue) -
getChunkSources
-
checkNode
protected void checkNode(long blockNode) - Specified by:
checkNodein classLightEngine<SkyLightSectionStorage.SkyDataLayerStorageMap, SkyLightSectionStorage>
-
updateSourcesInColumn
private void updateSourcesInColumn(int x, int z, int lowestSourceY) -
removeSourcesBelow
private void removeSourcesBelow(int x, int z, int lowestSourceY, int worldBottomY) -
addSourcesAbove
private void addSourcesAbove(int x, int z, int lowestSourceY, int worldBottomY) -
propagateIncrease
protected void propagateIncrease(long fromNode, long increaseData, int fromLevel) - Specified by:
propagateIncreasein classLightEngine<SkyLightSectionStorage.SkyDataLayerStorageMap, SkyLightSectionStorage>
-
propagateDecrease
protected void propagateDecrease(long fromNode, long decreaseData) - Specified by:
propagateDecreasein classLightEngine<SkyLightSectionStorage.SkyDataLayerStorageMap, SkyLightSectionStorage>
-
countEmptySectionsBelowIfAtBorder
private int countEmptySectionsBelowIfAtBorder(long blockNode) -
propagateFromEmptySections
private void propagateFromEmptySections(long toNode, Direction propagationDirection, int toLevel, boolean increase, int emptySectionsBelow) -
crossedSectionEdge
-
setLightEnabled
- Specified by:
setLightEnabledin interfaceLightEventListener- Overrides:
setLightEnabledin classLightEngine<SkyLightSectionStorage.SkyDataLayerStorageMap, SkyLightSectionStorage>
-
propagateLightSources
-