net.minecraft.world.chunk.light

public abstract class ChunkLightProvider<M extends ChunkToNibbleArrayMap<M>, S extends LightStorage<M>>

implements ChunkLightingView

net.minecraft.world.level.lighting.LightEngine
net.minecraft.class_3558
net.minecraft.world.chunk.light.ChunkLightProvider

Field summary

Modifier and TypeField
public static final int
MAX_LEVEL
field_44729
field_44729
protected static final int
MIN_OPACITY
field_44730
field_44730
protected static final long
PULL_LIGHT_IN_ENTRY
field_44731
field_44731
private static final int
MIN_QUEUE_SIZE
field_44732
field_44732
protected static final Direction[]
PROPAGATION_DIRECTIONS
field_16513
DIRECTIONS
protected final ChunkProvider
chunkSource
field_15795
chunkProvider
protected final S
storage
field_15793
lightStorage
private final it.unimi.dsi.fastutil.longs.LongOpenHashSet
blockNodesToCheck
field_44733
blockPositionsToCheck
private final it.unimi.dsi.fastutil.longs.LongArrayFIFOQueue
decreaseQueue
field_44734
queuedLightDecreases
private final it.unimi.dsi.fastutil.longs.LongArrayFIFOQueue
increaseQueue
field_44735
queuedLightIncreases
private static final int
CACHE_SIZE
field_31709
CHUNK_CACHE_SIZE
private final long[]
lastChunkPos
field_17397
cachedChunkPositions
private final LightSourceView[]
lastChunk
field_17398
cachedChunks

Constructor summary

ModifierConstructor
protected (ChunkProvider chunkProvider, S lightStorage)

Method summary

Modifier and TypeMethod
public static boolean
hasDifferentLightProperties(BlockState oldState, BlockState newState)
method_51561(class_2680 arg0, class_2680 arg1)
needsLightUpdate(BlockState oldState, BlockState newState)
public static int
getLightBlockInto(BlockState fromState, BlockState toState, Direction direction, int simpleOpacity)
method_20049(class_2680 arg0, class_2680 arg1, class_2350 arg2, int arg3)
getRealisticOpacity(BlockState state1, BlockState state2, Direction direction, int opacity2)
public static VoxelShape
getOcclusionShape(BlockState state, Direction direction)
method_51562(class_2680 arg0, class_2350 arg1)
getOpaqueShape(BlockState state, Direction direction)
protected static boolean
isEmptyShape(BlockState state)
method_51563(class_2680 arg0)
isTrivialForLighting(BlockState blockState)
protected BlockState
getState(BlockPos pos)
method_50018(class_2338 arg0)
getStateForLighting(BlockPos pos)
protected int
getOpacity(BlockState state)
method_50017(class_2680 arg0)
getOpacity(BlockState state)
protected boolean
shapeOccludes(BlockState fromState, BlockState toState, Direction direction)
method_50016(class_2680 arg0, class_2680 arg1, class_2350 arg2)
shapesCoverFullCube(BlockState source, BlockState target, Direction direction)
protected LightSourceView
getChunk(int chunkX, int chunkZ)
method_17529(int arg0, int arg1)
getChunk(int chunkX, int chunkZ)
private void
clearChunkCache()
method_17530()
clearChunkCache()
public void
checkBlock(BlockPos pos)
method_15513(class_2338 arg0)
checkBlock(BlockPos arg0)
public void
queueSectionData(long pos, DataLayer data)
method_15515(long arg0, class_2804 arg1)
enqueueSectionData(long sectionPos, ChunkNibbleArray lightArray)
public void
retainData(ChunkPos pos, boolean retain)
method_20599(class_1923 arg0, boolean arg1)
setRetainColumn(ChunkPos pos, boolean retainData)
public void
updateSectionStatus(SectionPos pos, boolean sectionEmpty)
method_15551(class_4076 arg0, boolean arg1)
setSectionStatus(ChunkSectionPos arg0, boolean arg1)
public void
setLightEnabled(ChunkPos pos, boolean enable)
method_15512(class_1923 arg0, boolean arg1)
setColumnEnabled(ChunkPos arg0, boolean arg1)
public int
runLightUpdates()
method_15516()
doLightUpdates()
private int
propagateIncreases()
method_51567()
processLightIncreases()
private int
propagateDecreases()
method_51570()
processLightDecreases()
protected void
enqueueDecrease(long fromNode, long decreaseData)
method_51565(long arg0, long arg1)
queueLightDecrease(long blockPos, long flags)
protected void
enqueueIncrease(long fromNode, long increaseData)
method_51566(long arg0, long arg1)
queueLightIncrease(long blockPos, long flags)
public boolean
hasLightWork()
method_15518()
hasUpdates()
public ChunkNibbleArray
getDataLayerData(SectionPos pos)
method_15544(class_4076 arg0)
getLightSection(ChunkSectionPos arg0)
public int
getLightValue(BlockPos pos)
method_15543(class_2338 arg0)
getLightLevel(BlockPos arg0)
public String
getDebugData(long sectionNode)
method_22875(long arg0)
displaySectionLevel(long sectionPos)
public LightStorage$Status
getDebugSectionType(long sectionNode)
method_51568(long arg0)
getStatus(long sectionPos)
protected abstract void
checkNode(long blockNode)
method_51529(long arg0)
checkForLightUpdate(long blockPos)
protected abstract void
propagateIncrease(long fromNode, long increaseData, int fromLevel)
method_51531(long arg0, long arg1, int arg2)
propagateLightIncrease(long blockPos, long packed, int lightLevel)
protected abstract void
propagateDecrease(long fromNode, long decreaseData)
method_51530(long arg0, long arg1)
propagateLightDecrease(long blockPos, long packed)