Class LightEngine<M extends DataLayerStorageMap<M>,S extends LayerLightSectionStorage<M>> 
java.lang.Object
net.minecraft.world.level.lighting.LightEngine<M,S> 
- All Implemented Interfaces:
- LayerLightEventListener,- LightEventListener
- Direct Known Subclasses:
- BlockLightEngine,- SkyLightEngine
public abstract class LightEngine<M extends DataLayerStorageMap<M>,S extends LayerLightSectionStorage<M>> 
extends Object
implements LayerLightEventListener
- 
Nested Class SummaryNested ClassesNested classes/interfaces inherited from interface net.minecraft.world.level.lighting.LayerLightEventListenerLayerLightEventListener.DummyLightLayerEventListener
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final it.unimi.dsi.fastutil.longs.LongOpenHashSetprivate static final intprotected final LightChunkGetterprivate final it.unimi.dsi.fastutil.longs.LongArrayFIFOQueueprivate final it.unimi.dsi.fastutil.longs.LongArrayFIFOQueueprivate final LightChunk[]private final long[]static final intprotected static final intprivate static final intprivate final BlockPos.MutableBlockPosprotected static final Direction[]protected static final longprotected final S
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidcheckBlock(BlockPos p_285352_) protected abstract voidcheckNode(long p_285507_) private voidprotected voidenqueueDecrease(long p_285228_, long p_285464_) protected voidenqueueIncrease(long p_285223_, long p_285022_) protected LightChunkgetChunk(int p_284967_, int p_285447_) getDataLayerData(SectionPos p_285093_) getDebugData(long p_285363_) getDebugSectionType(long p_285320_) static intgetLightBlockInto(BlockGetter p_285330_, BlockState p_285453_, BlockPos p_285187_, BlockState p_285318_, BlockPos p_285240_, Direction p_285196_, int p_285248_) intgetLightValue(BlockPos p_285149_) protected VoxelShapegetOcclusionShape(BlockState p_285136_, long p_285517_, Direction p_285376_) static VoxelShapegetOcclusionShape(BlockGetter p_285472_, BlockPos p_285229_, BlockState p_285020_, Direction p_285455_) protected intgetOpacity(BlockState p_285084_, BlockPos p_285057_) protected BlockStatestatic booleanhasDifferentLightProperties(BlockGetter p_285159_, BlockPos p_284985_, BlockState p_285110_, BlockState p_285372_) booleanprotected static booleanisEmptyShape(BlockState p_285133_) protected abstract voidpropagateDecrease(long p_284941_, long p_285213_) private intprotected abstract voidpropagateIncrease(long p_285325_, long p_285026_, int p_285197_) private intvoidqueueSectionData(long p_285221_, DataLayer p_285427_) voidretainData(ChunkPos p_285314_, boolean p_284937_) intvoidsetLightEnabled(ChunkPos p_285116_, boolean p_285522_) protected booleanshapeOccludes(long p_285115_, BlockState p_285154_, long p_284957_, BlockState p_285155_, Direction p_285327_) voidupdateSectionStatus(SectionPos p_285167_, boolean p_284934_) Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.world.level.lighting.LightEventListenerpropagateLightSources, updateSectionStatus
- 
Field Details- 
MAX_LEVELpublic static final int MAX_LEVEL- See Also:
 
- 
MIN_OPACITYprotected static final int MIN_OPACITY- See Also:
 
- 
PULL_LIGHT_IN_ENTRYprotected static final long PULL_LIGHT_IN_ENTRY
- 
MIN_QUEUE_SIZEprivate static final int MIN_QUEUE_SIZE- See Also:
 
- 
PROPAGATION_DIRECTIONS
- 
chunkSource
- 
storage
- 
blockNodesToCheckprivate final it.unimi.dsi.fastutil.longs.LongOpenHashSet blockNodesToCheck
- 
decreaseQueueprivate final it.unimi.dsi.fastutil.longs.LongArrayFIFOQueue decreaseQueue
- 
increaseQueueprivate final it.unimi.dsi.fastutil.longs.LongArrayFIFOQueue increaseQueue
- 
mutablePos
- 
CACHE_SIZEprivate static final int CACHE_SIZE- See Also:
 
- 
lastChunkPosprivate final long[] lastChunkPos
- 
lastChunk
 
- 
- 
Constructor Details- 
LightEngine
 
- 
- 
Method Details- 
hasDifferentLightPropertiespublic static boolean hasDifferentLightProperties(BlockGetter p_285159_, BlockPos p_284985_, BlockState p_285110_, BlockState p_285372_) 
- 
getLightBlockIntopublic static int getLightBlockInto(BlockGetter p_285330_, BlockState p_285453_, BlockPos p_285187_, BlockState p_285318_, BlockPos p_285240_, Direction p_285196_, int p_285248_) 
- 
getOcclusionShapepublic static VoxelShape getOcclusionShape(BlockGetter p_285472_, BlockPos p_285229_, BlockState p_285020_, Direction p_285455_) 
- 
isEmptyShape
- 
getState
- 
getOpacity
- 
shapeOccludesprotected boolean shapeOccludes(long p_285115_, BlockState p_285154_, long p_284957_, BlockState p_285155_, Direction p_285327_) 
- 
getOcclusionShape
- 
getChunk
- 
clearChunkCacheprivate void clearChunkCache()
- 
checkBlock- Specified by:
- checkBlockin interface- LightEventListener
 
- 
queueSectionData
- 
retainData
- 
updateSectionStatus- Specified by:
- updateSectionStatusin interface- LightEventListener
 
- 
setLightEnabled- Specified by:
- setLightEnabledin interface- LightEventListener
 
- 
runLightUpdatespublic int runLightUpdates()- Specified by:
- runLightUpdatesin interface- LightEventListener
 
- 
propagateIncreasesprivate int propagateIncreases()
- 
propagateDecreasesprivate int propagateDecreases()
- 
enqueueDecreaseprotected void enqueueDecrease(long p_285228_, long p_285464_) 
- 
enqueueIncreaseprotected void enqueueIncrease(long p_285223_, long p_285022_) 
- 
hasLightWorkpublic boolean hasLightWork()- Specified by:
- hasLightWorkin interface- LightEventListener
 
- 
getDataLayerData- Specified by:
- getDataLayerDatain interface- LayerLightEventListener
 
- 
getLightValue- Specified by:
- getLightValuein interface- LayerLightEventListener
 
- 
getDebugData
- 
getDebugSectionType
- 
checkNodeprotected abstract void checkNode(long p_285507_) 
- 
propagateIncreaseprotected abstract void propagateIncrease(long p_285325_, long p_285026_, int p_285197_) 
- 
propagateDecreaseprotected abstract void propagateDecrease(long p_284941_, long p_285213_) 
 
-