public abstract class LightEngine<M extends LightDataMap<M>,S extends SectionLightStorage<M>> extends LevelBasedGraph implements IWorldLightListener
IWorldLightListener.Dummy
Modifier and Type | Field and Description |
---|---|
protected IChunkLightProvider |
chunkProvider |
private static Direction[] |
DIRECTIONS |
private boolean |
field_215629_e |
private IBlockReader[] |
recentChunks |
private long[] |
recentPositions |
protected BlockPos.Mutable |
scratchPos |
protected S |
storage |
protected LightType |
type |
Constructor and Description |
---|
LightEngine(IChunkLightProvider chunkLightProvider,
LightType lightTypeIn,
S storageIn) |
Modifier and Type | Method and Description |
---|---|
void |
checkLight(BlockPos worldPos) |
protected int |
computeLevel(long pos,
long excludedSourcePos,
int level) |
static int |
func_215613_a(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_) |
boolean |
func_215619_a() |
void |
func_215620_a(ChunkPos p_215620_1_,
boolean p_215620_2_) |
void |
func_215623_a(BlockPos p_215623_1_,
int p_215623_2_) |
protected BlockState |
func_227468_a_(long p_227468_1_,
org.apache.commons.lang3.mutable.MutableInt p_227468_3_) |
private IBlockReader |
getChunkReader(int chunkX,
int chunkZ) |
NibbleArray |
getData(SectionPos p_215612_1_) |
java.lang.String |
getDebugString(long sectionPosIn) |
protected int |
getEdgeLevel(long startPos,
long endPos,
int startLevel) |
protected int |
getLevel(long sectionPosIn) |
protected int |
getLevelFromArray(NibbleArray array,
long worldPos) |
int |
getLightFor(BlockPos worldPos) |
protected VoxelShape |
getVoxelShape(BlockState blockStateIn,
long worldPos,
Direction directionIn) |
private void |
invalidateCaches() |
protected boolean |
isRoot(long pos) |
abstract int |
queuedUpdateSize() |
void |
retainChunkData(ChunkPos pos,
boolean retain) |
protected void |
scheduleUpdate(long worldPos) |
protected void |
setData(long sectionPosIn,
NibbleArray array) |
protected void |
setLevel(long sectionPosIn,
int level) |
int |
tick(int toUpdateCount,
boolean updateSkyLight,
boolean updateBlockLight) |
void |
updateSectionStatus(SectionPos pos,
boolean isEmpty) |
cancelUpdate, func_227465_a_, func_227467_c_, needsUpdate, notifyNeighbors, processUpdates, propagateLevel, scheduleUpdate
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
func_215567_a
private static final Direction[] DIRECTIONS
protected final IChunkLightProvider chunkProvider
protected final LightType type
protected final S extends SectionLightStorage<M> storage
private boolean field_215629_e
protected final BlockPos.Mutable scratchPos
private final long[] recentPositions
private final IBlockReader[] recentChunks
public LightEngine(IChunkLightProvider chunkLightProvider, LightType lightTypeIn, S storageIn)
protected void scheduleUpdate(long worldPos)
scheduleUpdate
in class LevelBasedGraph
@Nullable private IBlockReader getChunkReader(int chunkX, int chunkZ)
private void invalidateCaches()
protected BlockState func_227468_a_(long p_227468_1_, @Nullable org.apache.commons.lang3.mutable.MutableInt p_227468_3_)
protected VoxelShape getVoxelShape(BlockState blockStateIn, long worldPos, Direction directionIn)
public static int func_215613_a(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_)
protected boolean isRoot(long pos)
isRoot
in class LevelBasedGraph
protected int computeLevel(long pos, long excludedSourcePos, int level)
computeLevel
in class LevelBasedGraph
protected int getLevel(long sectionPosIn)
getLevel
in class LevelBasedGraph
protected int getLevelFromArray(NibbleArray array, long worldPos)
protected void setLevel(long sectionPosIn, int level)
setLevel
in class LevelBasedGraph
protected int getEdgeLevel(long startPos, long endPos, int startLevel)
getEdgeLevel
in class LevelBasedGraph
public boolean func_215619_a()
public int tick(int toUpdateCount, boolean updateSkyLight, boolean updateBlockLight)
protected void setData(long sectionPosIn, @Nullable NibbleArray array)
@Nullable public NibbleArray getData(SectionPos p_215612_1_)
getData
in interface IWorldLightListener
public int getLightFor(BlockPos worldPos)
getLightFor
in interface IWorldLightListener
public java.lang.String getDebugString(long sectionPosIn)
public void checkLight(BlockPos worldPos)
public void func_215623_a(BlockPos p_215623_1_, int p_215623_2_)
public void updateSectionStatus(SectionPos pos, boolean isEmpty)
updateSectionStatus
in interface ILightListener
public void func_215620_a(ChunkPos p_215620_1_, boolean p_215620_2_)
public void retainChunkData(ChunkPos pos, boolean retain)
public abstract int queuedUpdateSize()
queuedUpdateSize
in class LevelBasedGraph