Class LayerLightEngine<M extends DataLayerStorageMap<M>,S extends LayerLightSectionStorage<M>>
java.lang.Object
net.minecraft.world.level.lighting.DynamicGraphMinFixedPoint
net.minecraft.world.level.lighting.LayerLightEngine<M,S>
- All Implemented Interfaces:
LayerLightEventListener,LightEventListener
- Direct Known Subclasses:
BlockLightEngine,SkyLightEngine
public abstract class LayerLightEngine<M extends DataLayerStorageMap<M>,S extends LayerLightSectionStorage<M>>
extends DynamicGraphMinFixedPoint
implements LayerLightEventListener
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.world.level.lighting.LayerLightEventListener
LayerLightEventListener.DummyLightLayerEventListener -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final intprotected final LightChunkGetterprivate static final Direction[]private final BlockGetter[]private final long[]protected final LightLayerprotected final BlockPos.MutableBlockPosprivate booleanstatic final longprotected final S -
Constructor Summary
ConstructorsConstructorDescriptionLayerLightEngine(LightChunkGetter p_75640_, LightLayer p_75641_, S p_75642_) -
Method Summary
Modifier and TypeMethodDescriptionvoidcheckBlock(BlockPos p_75686_) protected voidcheckNode(long p_75708_) private voidprotected intcomputeLevelFromNeighbor(long p_75696_, long p_75697_, int p_75698_) voidenableLightSources(ChunkPos p_75676_, boolean p_75677_) private BlockGettergetChunk(int p_75645_, int p_75646_) protected intgetComputedLevel(long p_75657_, long p_75658_, int p_75659_) getDataLayerData(SectionPos p_75690_) getDebugData(long p_75694_) protected intgetLevel(long p_75705_) protected intstatic intgetLightBlockInto(BlockGetter p_75668_, BlockState p_75669_, BlockPos p_75670_, BlockState p_75671_, BlockPos p_75672_, Direction p_75673_, int p_75674_) intgetLightValue(BlockPos p_75703_) protected VoxelShapegetShape(BlockState p_75679_, long p_75680_, Direction p_75681_) protected BlockStategetStateAndOpacity(long p_75665_, org.apache.commons.lang3.mutable.MutableInt p_75666_) booleanprotected booleanisSource(long p_75652_) voidonBlockEmissionIncrease(BlockPos p_75687_, int p_75688_) abstract intprotected voidqueueSectionData(long p_75661_, DataLayer p_75662_, boolean p_75663_) voidretainData(ChunkPos p_75700_, boolean p_75701_) intrunUpdates(int p_75648_, boolean p_75649_, boolean p_75650_) protected voidsetLevel(long p_75654_, int p_75655_) voidupdateSectionStatus(SectionPos p_75692_, boolean p_75693_) Methods inherited from class net.minecraft.world.level.lighting.DynamicGraphMinFixedPoint
checkEdge, checkNeighbor, checkNeighborsAfterUpdate, getQueueSize, hasWork, removeFromQueue, removeIf, runUpdatesMethods 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
-
SELF_SOURCE
public static final long SELF_SOURCE- See Also:
-
DIRECTIONS
-
chunkSource
-
layer
-
storage
-
runningLightUpdates
private boolean runningLightUpdates -
pos
-
CACHE_SIZE
private static final int CACHE_SIZE- See Also:
-
lastChunkPos
private final long[] lastChunkPos -
lastChunk
-
-
Constructor Details
-
LayerLightEngine
-
-
Method Details
-
checkNode
protected void checkNode(long p_75708_) - Overrides:
checkNodein classDynamicGraphMinFixedPoint
-
getChunk
-
clearCache
private void clearCache() -
getStateAndOpacity
protected BlockState getStateAndOpacity(long p_75665_, @Nullable org.apache.commons.lang3.mutable.MutableInt p_75666_) -
getShape
-
getLightBlockInto
public static int getLightBlockInto(BlockGetter p_75668_, BlockState p_75669_, BlockPos p_75670_, BlockState p_75671_, BlockPos p_75672_, Direction p_75673_, int p_75674_) -
isSource
protected boolean isSource(long p_75652_) - Specified by:
isSourcein classDynamicGraphMinFixedPoint
-
getComputedLevel
protected int getComputedLevel(long p_75657_, long p_75658_, int p_75659_) - Specified by:
getComputedLevelin classDynamicGraphMinFixedPoint
-
getLevel
protected int getLevel(long p_75705_) - Specified by:
getLevelin classDynamicGraphMinFixedPoint
-
getLevel
-
setLevel
protected void setLevel(long p_75654_, int p_75655_) - Specified by:
setLevelin classDynamicGraphMinFixedPoint
-
computeLevelFromNeighbor
protected int computeLevelFromNeighbor(long p_75696_, long p_75697_, int p_75698_) - Specified by:
computeLevelFromNeighborin classDynamicGraphMinFixedPoint
-
hasLightWork
public boolean hasLightWork()- Specified by:
hasLightWorkin interfaceLightEventListener
-
runUpdates
public int runUpdates(int p_75648_, boolean p_75649_, boolean p_75650_) - Specified by:
runUpdatesin interfaceLightEventListener
-
queueSectionData
-
getDataLayerData
- Specified by:
getDataLayerDatain interfaceLayerLightEventListener
-
getLightValue
- Specified by:
getLightValuein interfaceLayerLightEventListener
-
getDebugData
-
checkBlock
- Specified by:
checkBlockin interfaceLightEventListener
-
onBlockEmissionIncrease
- Specified by:
onBlockEmissionIncreasein interfaceLightEventListener
-
updateSectionStatus
- Specified by:
updateSectionStatusin interfaceLightEventListener
-
enableLightSources
- Specified by:
enableLightSourcesin interfaceLightEventListener
-
retainData
-
queuedUpdateSize
public abstract int queuedUpdateSize()- Overrides:
queuedUpdateSizein classDynamicGraphMinFixedPoint
-