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
-
Method Summary
Modifier and TypeMethodDescriptionstatic ChunkSectionLight
static ChunkSectionLight
byte @Nullable []
Returns the nibblearray's raw block light byte array if present.@Nullable NibbleArray
Returns the block light nibblearray.byte @Nullable []
Returns the nibblearray's raw sky light byte array if present.@Nullable NibbleArray
Returns the sky light nibblearray.boolean
Returns whether the section has block light.boolean
Returns whether the section has sky light.void
readBlockLight
(io.netty.buffer.ByteBuf input) void
readSkyLight
(io.netty.buffer.ByteBuf input) void
setBlockLight
(byte[] data) Set the block light array.void
setSkyLight
(byte[] data) Set the sky light array.void
writeBlockLight
(io.netty.buffer.ByteBuf output) Write the block light to a buffer.void
writeSkyLight
(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:ChunkSectionLight
Set the block light array.- Specified by:
setBlockLight
in interfaceChunkSectionLight
- Parameters:
data
- raw block light data
-
setSkyLight
public void setSkyLight(byte[] data) Description copied from interface:ChunkSectionLight
Set the sky light array.- Specified by:
setSkyLight
in interfaceChunkSectionLight
- Parameters:
data
- raw sky light data
-
getBlockLight
public byte @Nullable [] getBlockLight()Description copied from interface:ChunkSectionLight
Returns the nibblearray's raw block light byte array if present.- Specified by:
getBlockLight
in interfaceChunkSectionLight
- Returns:
- the nibblearray's raw block light byte array if present
- See Also:
-
getBlockLightNibbleArray
Description copied from interface:ChunkSectionLight
Returns the block light nibblearray.- Specified by:
getBlockLightNibbleArray
in interfaceChunkSectionLight
- Returns:
- block light nibblearray
- See Also:
-
getSkyLight
public byte @Nullable [] getSkyLight()Description copied from interface:ChunkSectionLight
Returns the nibblearray's raw sky light byte array if present.- Specified by:
getSkyLight
in interfaceChunkSectionLight
- Returns:
- the nibblearray's raw sky light byte array if present
- See Also:
-
getSkyLightNibbleArray
Description copied from interface:ChunkSectionLight
Returns the sky light nibblearray.- Specified by:
getSkyLightNibbleArray
in interfaceChunkSectionLight
- Returns:
- sky light nibblearray
- See Also:
-
readBlockLight
public void readBlockLight(io.netty.buffer.ByteBuf input) - Specified by:
readBlockLight
in interfaceChunkSectionLight
-
readSkyLight
public void readSkyLight(io.netty.buffer.ByteBuf input) - Specified by:
readSkyLight
in interfaceChunkSectionLight
-
writeBlockLight
public void writeBlockLight(io.netty.buffer.ByteBuf output) Description copied from interface:ChunkSectionLight
Write the block light to a buffer.- Specified by:
writeBlockLight
in interfaceChunkSectionLight
- Parameters:
output
- buffer to write to
-
writeSkyLight
public void writeSkyLight(io.netty.buffer.ByteBuf output) Description copied from interface:ChunkSectionLight
Write the sky light to a buffer.- Specified by:
writeSkyLight
in interfaceChunkSectionLight
- Parameters:
output
- buffer to write to
-
hasSkyLight
public boolean hasSkyLight()Description copied from interface:ChunkSectionLight
Returns whether the section has sky light.- Specified by:
hasSkyLight
in interfaceChunkSectionLight
- Returns:
- true if sky light is present
-
hasBlockLight
public boolean hasBlockLight()Description copied from interface:ChunkSectionLight
Returns whether the section has block light. This returns true unless specifically set to null.- Specified by:
hasBlockLight
in interfaceChunkSectionLight
- Returns:
- true if block light is present
-