Interface ChunkSectionLight

    • Field Detail

      • LIGHT_LENGTH

        static final int LIGHT_LENGTH
        Length of the sky and block light nibble arrays.
        See Also:
        Constant Field Values
    • Method Detail

      • 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:
        hasSkyLight()
      • 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:
        hasBlockLight()
      • 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:
        hasSkyLight()
      • getBlockLightNibbleArray

        @Nullable NibbleArray getBlockLightNibbleArray()
        Returns the block light nibblearray.
        Returns:
        block light nibblearray
        See Also:
        hasBlockLight()
      • 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