Interface ChunkSectionLight

All Known Implementing Classes:
ChunkSectionLightImpl

public interface ChunkSectionLight
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Length of the sky and block light nibble arrays.
  • Method Summary

    Modifier and Type
    Method
    Description
    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.
  • Field Details

    • LIGHT_LENGTH

      static final int LIGHT_LENGTH
      Length 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 skylight is present
    • hasBlockLight

      boolean hasBlockLight()
      Returns whether the section has block light. This returns true unless specifically set to null.
      Returns:
      true if skylight 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