类 LightEngine<M extends DataLayerStorageMap<M>,S extends LayerLightSectionStorage<M>>
java.lang.Object
net.minecraft.world.level.lighting.LightEngine<M,S>
- 所有已实现的接口:
LayerLightEventListener
,LightEventListener
- 直接已知子类:
BlockLightEngine
,SkyLightEngine
public abstract class LightEngine<M extends DataLayerStorageMap<M>,S extends LayerLightSectionStorage<M>>
extends Object
implements LayerLightEventListener
-
嵌套类概要
嵌套类从接口继承的嵌套类/接口 net.minecraft.world.level.lighting.LayerLightEventListener
LayerLightEventListener.DummyLightLayerEventListener
-
字段概要
字段修饰符和类型字段说明private final it.unimi.dsi.fastutil.longs.LongOpenHashSet
private static final int
protected final LightChunkGetter
private final it.unimi.dsi.fastutil.longs.LongArrayFIFOQueue
private final it.unimi.dsi.fastutil.longs.LongArrayFIFOQueue
private final LightChunk[]
private final long[]
static final int
protected static final int
private static final int
private final BlockPos.MutableBlockPos
protected static final Direction[]
protected static final long
protected final S
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明void
checkBlock
(BlockPos pPos) protected abstract void
checkNode
(long pPackedPos) private void
protected void
enqueueDecrease
(long pPackedPos1, long pPackedPos2) protected void
enqueueIncrease
(long pPackedPos1, long pPackedPos2) protected LightChunk
getChunk
(int pX, int pZ) getDataLayerData
(SectionPos pSectionPos) getDebugData
(long pSectionPos) getDebugSectionType
(long pSectionPos) static int
getLightBlockInto
(BlockGetter pLevel, BlockState pState1, BlockPos pPos1, BlockState pState2, BlockPos pPos2, Direction pDirection, int pDefaultReturnValue) int
getLightValue
(BlockPos pLevelPos) protected VoxelShape
getOcclusionShape
(BlockState pState, long pPos, Direction pDirection) static VoxelShape
getOcclusionShape
(BlockGetter pLevel, BlockPos pPos, BlockState pState, Direction pDirection) protected int
getOpacity
(BlockState pState, BlockPos pPos) protected BlockState
static boolean
hasDifferentLightProperties
(BlockGetter pLevel, BlockPos pPos, BlockState pState1, BlockState pState2) boolean
protected static boolean
isEmptyShape
(BlockState pState) protected abstract void
propagateDecrease
(long pPackedPos, long pLightLevel) private int
protected abstract void
propagateIncrease
(long pPackedPos, long pQueueEntry, int pLightLevel) private int
void
queueSectionData
(long pSectionPos, DataLayer pData) void
retainData
(ChunkPos pChunkPos, boolean pRetainData) int
void
setLightEnabled
(ChunkPos pChunkPos, boolean pLightEnabled) protected boolean
shapeOccludes
(long pPackedPos1, BlockState pState1, long pPackedPos2, BlockState pState2, Direction pDirection) void
updateSectionStatus
(SectionPos pPos, boolean pIsQueueEmpty) 从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
从接口继承的方法 net.minecraft.world.level.lighting.LightEventListener
propagateLightSources, updateSectionStatus
-
字段详细资料
-
MAX_LEVEL
public static final int MAX_LEVEL- 另请参阅:
-
MIN_OPACITY
protected static final int MIN_OPACITY- 另请参阅:
-
PULL_LIGHT_IN_ENTRY
protected static final long PULL_LIGHT_IN_ENTRY -
MIN_QUEUE_SIZE
private static final int MIN_QUEUE_SIZE- 另请参阅:
-
PROPAGATION_DIRECTIONS
-
chunkSource
-
storage
-
blockNodesToCheck
private final it.unimi.dsi.fastutil.longs.LongOpenHashSet blockNodesToCheck -
decreaseQueue
private final it.unimi.dsi.fastutil.longs.LongArrayFIFOQueue decreaseQueue -
increaseQueue
private final it.unimi.dsi.fastutil.longs.LongArrayFIFOQueue increaseQueue -
mutablePos
-
CACHE_SIZE
private static final int CACHE_SIZE- 另请参阅:
-
lastChunkPos
private final long[] lastChunkPos -
lastChunk
-
-
构造器详细资料
-
LightEngine
-
-
方法详细资料
-
hasDifferentLightProperties
public static boolean hasDifferentLightProperties(BlockGetter pLevel, BlockPos pPos, BlockState pState1, BlockState pState2) -
getLightBlockInto
public static int getLightBlockInto(BlockGetter pLevel, BlockState pState1, BlockPos pPos1, BlockState pState2, BlockPos pPos2, Direction pDirection, int pDefaultReturnValue) -
getOcclusionShape
public static VoxelShape getOcclusionShape(BlockGetter pLevel, BlockPos pPos, BlockState pState, Direction pDirection) -
isEmptyShape
-
getState
-
getOpacity
-
shapeOccludes
protected boolean shapeOccludes(long pPackedPos1, BlockState pState1, long pPackedPos2, BlockState pState2, Direction pDirection) -
getOcclusionShape
-
getChunk
-
clearChunkCache
private void clearChunkCache() -
checkBlock
- 指定者:
checkBlock
在接口中LightEventListener
-
queueSectionData
-
retainData
-
updateSectionStatus
- 指定者:
updateSectionStatus
在接口中LightEventListener
-
setLightEnabled
- 指定者:
setLightEnabled
在接口中LightEventListener
-
runLightUpdates
public int runLightUpdates()- 指定者:
runLightUpdates
在接口中LightEventListener
-
propagateIncreases
private int propagateIncreases() -
propagateDecreases
private int propagateDecreases() -
enqueueDecrease
protected void enqueueDecrease(long pPackedPos1, long pPackedPos2) -
enqueueIncrease
protected void enqueueIncrease(long pPackedPos1, long pPackedPos2) -
hasLightWork
public boolean hasLightWork()- 指定者:
hasLightWork
在接口中LightEventListener
-
getDataLayerData
- 指定者:
getDataLayerData
在接口中LayerLightEventListener
-
getLightValue
- 指定者:
getLightValue
在接口中LayerLightEventListener
-
getDebugData
-
getDebugSectionType
-
checkNode
protected abstract void checkNode(long pPackedPos) -
propagateIncrease
protected abstract void propagateIncrease(long pPackedPos, long pQueueEntry, int pLightLevel) -
propagateDecrease
protected abstract void propagateDecrease(long pPackedPos, long pLightLevel)
-