Package net.minecraft.world.lighting
Class LightEngine<M extends LightDataMap<M>,S extends SectionLightStorage<M>>
java.lang.Object
net.minecraft.world.lighting.LevelBasedGraph
net.minecraft.world.lighting.LightEngine<M,S>
- All Implemented Interfaces:
ILightListener,IWorldLightListener
- Direct Known Subclasses:
BlockLightEngine,SkyLightEngine
public abstract class LightEngine<M extends LightDataMap<M>,S extends SectionLightStorage<M>>
extends LevelBasedGraph
implements IWorldLightListener
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.world.lighting.IWorldLightListener
IWorldLightListener.Dummy -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final IChunkLightProviderprivate static final Direction[]private final IBlockReader[]private final long[]protected final LightTypeprotected final BlockPos.Mutableprivate booleanprotected final S -
Constructor Summary
ConstructorsConstructorDescriptionLightEngine(IChunkLightProvider p_i51296_1_, LightType p_i51296_2_, S p_i51296_3_) -
Method Summary
Modifier and TypeMethodDescriptionvoidcheckBlock(BlockPos p_215617_1_) protected voidcheckNode(long p_215473_1_) private voidprotected intcomputeLevelFromNeighbor(long p_215480_1_, long p_215480_3_, int p_215480_5_) voidenableLightSources(ChunkPos p_215620_1_, boolean p_215620_2_) private IBlockReadergetChunk(int p_215615_1_, int p_215615_2_) protected intgetComputedLevel(long p_215477_1_, long p_215477_3_, int p_215477_5_) getDataLayerData(SectionPos p_215612_1_) getDebugData(long p_215614_1_) protected intgetLevel(long p_215471_1_) protected intgetLevel(NibbleArray p_215622_1_, long p_215622_2_) static intgetLightBlockInto(IBlockReader p_215613_0_, BlockState p_215613_1_, BlockPos p_215613_2_, BlockState p_215613_3_, BlockPos p_215613_4_, Direction p_215613_5_, int p_215613_6_) intgetLightValue(BlockPos p_215611_1_) protected VoxelShapegetShape(BlockState p_223405_1_, long p_223405_2_, Direction p_223405_4_) protected BlockStategetStateAndOpacity(long p_227468_1_, org.apache.commons.lang3.mutable.MutableInt p_227468_3_) booleanprotected booleanisSource(long p_215485_1_) voidonBlockEmissionIncrease(BlockPos p_215623_1_, int p_215623_2_) abstract intprotected voidqueueSectionData(long p_215621_1_, NibbleArray p_215621_3_, boolean p_215621_4_) voidretainData(ChunkPos p_223129_1_, boolean p_223129_2_) intrunUpdates(int p_215616_1_, boolean p_215616_2_, boolean p_215616_3_) protected voidsetLevel(long p_215476_1_, int p_215476_3_) voidupdateSectionStatus(SectionPos p_215566_1_, boolean p_215566_2_) Methods inherited from class net.minecraft.world.lighting.LevelBasedGraph
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.lighting.ILightListener
updateSectionStatus
-
Field Details
-
DIRECTIONS
-
chunkSource
-
layer
-
storage
-
runningLightUpdates
private boolean runningLightUpdates -
pos
-
lastChunkPos
private final long[] lastChunkPos -
lastChunk
-
-
Constructor Details
-
LightEngine
-
-
Method Details
-
checkNode
protected void checkNode(long p_215473_1_) - Overrides:
checkNodein classLevelBasedGraph
-
getChunk
-
clearCache
private void clearCache() -
getStateAndOpacity
protected BlockState getStateAndOpacity(long p_227468_1_, @Nullable org.apache.commons.lang3.mutable.MutableInt p_227468_3_) -
getShape
-
getLightBlockInto
public static int getLightBlockInto(IBlockReader p_215613_0_, BlockState p_215613_1_, BlockPos p_215613_2_, BlockState p_215613_3_, BlockPos p_215613_4_, Direction p_215613_5_, int p_215613_6_) -
isSource
protected boolean isSource(long p_215485_1_) - Specified by:
isSourcein classLevelBasedGraph
-
getComputedLevel
protected int getComputedLevel(long p_215477_1_, long p_215477_3_, int p_215477_5_) - Specified by:
getComputedLevelin classLevelBasedGraph
-
getLevel
protected int getLevel(long p_215471_1_) - Specified by:
getLevelin classLevelBasedGraph
-
getLevel
-
setLevel
protected void setLevel(long p_215476_1_, int p_215476_3_) - Specified by:
setLevelin classLevelBasedGraph
-
computeLevelFromNeighbor
protected int computeLevelFromNeighbor(long p_215480_1_, long p_215480_3_, int p_215480_5_) - Specified by:
computeLevelFromNeighborin classLevelBasedGraph
-
hasLightWork
public boolean hasLightWork() -
runUpdates
public int runUpdates(int p_215616_1_, boolean p_215616_2_, boolean p_215616_3_) -
queueSectionData
protected void queueSectionData(long p_215621_1_, @Nullable NibbleArray p_215621_3_, boolean p_215621_4_) -
getDataLayerData
- Specified by:
getDataLayerDatain interfaceIWorldLightListener
-
getLightValue
- Specified by:
getLightValuein interfaceIWorldLightListener
-
getDebugData
-
checkBlock
-
onBlockEmissionIncrease
-
updateSectionStatus
- Specified by:
updateSectionStatusin interfaceILightListener
-
enableLightSources
-
retainData
-
queuedUpdateSize
public abstract int queuedUpdateSize()- Overrides:
queuedUpdateSizein classLevelBasedGraph
-