Interface ChunkSectionLight
- All Known Implementing Classes:
ChunkSectionLightImpl
public interface ChunkSectionLight
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intLength of the sky and block light nibble arrays. -
Method Summary
Modifier and TypeMethodDescriptionbyte @Nullable []Returns the nibblearray's raw block light byte array if present.@Nullable NibbleArrayReturns the block light nibblearray.byte @Nullable []Returns the nibblearray's raw sky light byte array if present.@Nullable NibbleArrayReturns the sky light nibblearray.booleanReturns whether the section has block light.booleanReturns whether the section has sky light.voidreadBlockLight(io.netty.buffer.ByteBuf input) voidreadSkyLight(io.netty.buffer.ByteBuf input) voidsetBlockLight(byte[] data) Set the block light array.voidsetSkyLight(byte[] data) Set the sky light array.voidwriteBlockLight(io.netty.buffer.ByteBuf output) Write the block light to a buffer.voidwriteSkyLight(io.netty.buffer.ByteBuf output) Write the sky light to a buffer.
-
Field Details
-
LIGHT_LENGTH
static final int LIGHT_LENGTHLength of the sky and block light nibble arrays.- See Also:
-
-
Method Details
-
hasSkyLight
boolean hasSkyLight()Returns whether the section has sky light.- Returns:
- true if sky light is present
-
hasBlockLight
boolean hasBlockLight()Returns whether the section has block light. This returns true unless specifically set to null.- Returns:
- true if block light is present
-
getSkyLight
byte @Nullable [] getSkyLight()Returns the nibblearray's raw sky light byte array if present.- Returns:
- the nibblearray's raw sky light byte array if present
- See Also:
-
getBlockLight
byte @Nullable [] getBlockLight()Returns the nibblearray's raw block light byte array if present.- Returns:
- the nibblearray's raw block light byte array if present
- See Also:
-
setSkyLight
void setSkyLight(byte[] data) Set the sky light array.- Parameters:
data- raw sky light data
-
setBlockLight
void setBlockLight(byte[] data) Set the block light array.- Parameters:
data- raw block light data
-
getSkyLightNibbleArray
@Nullable NibbleArray getSkyLightNibbleArray()Returns the sky light nibblearray.- Returns:
- sky light nibblearray
- See Also:
-
getBlockLightNibbleArray
@Nullable NibbleArray getBlockLightNibbleArray()Returns the block light nibblearray.- Returns:
- block light nibblearray
- See Also:
-
readSkyLight
void readSkyLight(io.netty.buffer.ByteBuf input) -
readBlockLight
void readBlockLight(io.netty.buffer.ByteBuf input) -
writeSkyLight
void writeSkyLight(io.netty.buffer.ByteBuf output) Write the sky light to a buffer.- Parameters:
output- buffer to write to
-
writeBlockLight
void writeBlockLight(io.netty.buffer.ByteBuf output) Write the block light to a buffer.- Parameters:
output- buffer to write to
-