Class ChunkSectionLightImpl
java.lang.Object
com.viaversion.viaversion.api.minecraft.chunks.ChunkSectionLightImpl
- All Implemented Interfaces:
ChunkSectionLight
-
Field Summary
Fields inherited from interface com.viaversion.viaversion.api.minecraft.chunks.ChunkSectionLight
LIGHT_LENGTH -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ChunkSectionLightstatic ChunkSectionLightbyte @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.
-
Constructor Details
-
ChunkSectionLightImpl
protected ChunkSectionLightImpl()
-
-
Method Details
-
createWithBlockLight
-
createEmpty
-
setBlockLight
public void setBlockLight(byte[] data) Description copied from interface:ChunkSectionLightSet the block light array.- Specified by:
setBlockLightin interfaceChunkSectionLight- Parameters:
data- raw block light data
-
setSkyLight
public void setSkyLight(byte[] data) Description copied from interface:ChunkSectionLightSet the sky light array.- Specified by:
setSkyLightin interfaceChunkSectionLight- Parameters:
data- raw sky light data
-
getBlockLight
public byte @Nullable [] getBlockLight()Description copied from interface:ChunkSectionLightReturns the nibblearray's raw block light byte array if present.- Specified by:
getBlockLightin interfaceChunkSectionLight- Returns:
- the nibblearray's raw block light byte array if present
- See Also:
-
getBlockLightNibbleArray
Description copied from interface:ChunkSectionLightReturns the block light nibblearray.- Specified by:
getBlockLightNibbleArrayin interfaceChunkSectionLight- Returns:
- block light nibblearray
- See Also:
-
getSkyLight
public byte @Nullable [] getSkyLight()Description copied from interface:ChunkSectionLightReturns the nibblearray's raw sky light byte array if present.- Specified by:
getSkyLightin interfaceChunkSectionLight- Returns:
- the nibblearray's raw sky light byte array if present
- See Also:
-
getSkyLightNibbleArray
Description copied from interface:ChunkSectionLightReturns the sky light nibblearray.- Specified by:
getSkyLightNibbleArrayin interfaceChunkSectionLight- Returns:
- sky light nibblearray
- See Also:
-
readBlockLight
public void readBlockLight(io.netty.buffer.ByteBuf input) - Specified by:
readBlockLightin interfaceChunkSectionLight
-
readSkyLight
public void readSkyLight(io.netty.buffer.ByteBuf input) - Specified by:
readSkyLightin interfaceChunkSectionLight
-
writeBlockLight
public void writeBlockLight(io.netty.buffer.ByteBuf output) Description copied from interface:ChunkSectionLightWrite the block light to a buffer.- Specified by:
writeBlockLightin interfaceChunkSectionLight- Parameters:
output- buffer to write to
-
writeSkyLight
public void writeSkyLight(io.netty.buffer.ByteBuf output) Description copied from interface:ChunkSectionLightWrite the sky light to a buffer.- Specified by:
writeSkyLightin interfaceChunkSectionLight- Parameters:
output- buffer to write to
-
hasSkyLight
public boolean hasSkyLight()Description copied from interface:ChunkSectionLightReturns whether the section has sky light.- Specified by:
hasSkyLightin interfaceChunkSectionLight- Returns:
- true if sky light is present
-
hasBlockLight
public boolean hasBlockLight()Description copied from interface:ChunkSectionLightReturns whether the section has block light. This returns true unless specifically set to null.- Specified by:
hasBlockLightin interfaceChunkSectionLight- Returns:
- true if block light is present
-