public class LightingProvider extends Object implements LightingView
Modifier and Type | Field and Description |
---|---|
private ChunkLightProvider<?,?> |
blockLightProvider |
private ChunkLightProvider<?,?> |
skyLightProvider |
Constructor and Description |
---|
LightingProvider(ChunkProvider chunkProvider,
boolean hasBlockLight,
boolean hasSkyLight) |
Modifier and Type | Method and Description |
---|---|
void |
addLightSource(BlockPos pos,
int level) |
void |
checkBlock(BlockPos pos) |
int |
doLightUpdates(int maxUpdateCount,
boolean doSkylight,
boolean skipEdgeLightPropagation) |
ChunkLightingView |
get(LightType lightType) |
int |
getLight(BlockPos pos,
int ambientDarkness) |
boolean |
hasUpdates() |
String |
method_22876(LightType lightType,
ChunkSectionPos chunkSectionPos) |
void |
queueData(LightType lightType,
ChunkSectionPos pos,
ChunkNibbleArray nibbles) |
void |
setLightEnabled(ChunkPos pos,
boolean lightEnabled) |
void |
setRetainData(ChunkPos pos,
boolean retainData) |
void |
updateSectionStatus(ChunkSectionPos pos,
boolean status) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
updateSectionStatus
@Nullable private final ChunkLightProvider<?,?> blockLightProvider
@Nullable private final ChunkLightProvider<?,?> skyLightProvider
public LightingProvider(ChunkProvider chunkProvider, boolean hasBlockLight, boolean hasSkyLight)
public void checkBlock(BlockPos pos)
public void addLightSource(BlockPos pos, int level)
public boolean hasUpdates()
public int doLightUpdates(int maxUpdateCount, boolean doSkylight, boolean skipEdgeLightPropagation)
public void updateSectionStatus(ChunkSectionPos pos, boolean status)
updateSectionStatus
in interface LightingView
public void setLightEnabled(ChunkPos pos, boolean lightEnabled)
public ChunkLightingView get(LightType lightType)
@Environment(value=CLIENT) public String method_22876(LightType lightType, ChunkSectionPos chunkSectionPos)
public void queueData(LightType lightType, ChunkSectionPos pos, @Nullable ChunkNibbleArray nibbles)
public void setRetainData(ChunkPos pos, boolean retainData)
public int getLight(BlockPos pos, int ambientDarkness)