ChunkSection

class ChunkSection(y: Byte)

16x16x16 subchunk.

Constructors

ChunkSection
Link copied to clipboard
fun ChunkSection(nbt: NBTCompound, version: SupportedVersion = SupportedVersion.Latest)
Constructs a ChunkSection from a TAG_Compound.
ChunkSection
Link copied to clipboard
fun ChunkSection(y: Byte)

Functions

get
Link copied to clipboard
operator fun get(x: Int, y: Int, z: Int): BlockState
Returns the block state at the given positionIf this section is empty, will throw AnvilExceptionX,Y,Z must be in a 16x16x16 cube.
getBiome
Link copied to clipboard
fun getBiome(x: Int, y: Int, z: Int): String
Returns the biome stored inside this section at the given position Be aware that biome data may not be present inside this column, in that case, this method returns UnknownBiomeCoordinates must be section-local
getBlockLight
Link copied to clipboard
fun getBlockLight(x: Int, y: Int, z: Int): Byte
Returns the block light at the given positionIf this section is empty, will throw AnvilExceptionX,Y,Z must be in a 16x16x16 cube.
getSkyLight
Link copied to clipboard
fun getSkyLight(x: Int, y: Int, z: Int): Byte
Returns the sky light at the given positionIf this section is empty, will throw AnvilExceptionX,Y,Z must be in a 16x16x16 cube.
hasBiomeData
Link copied to clipboard
fun hasBiomeData(): Boolean
Returs true iif this section has biome data
set
Link copied to clipboard
operator fun set(x: Int, y: Int, z: Int, block: BlockState)
Sets the block state in this section at the given position.
setBiome
Link copied to clipboard
fun setBiome(x: Int, y: Int, z: Int, biomeID: String)
Sets the biome stored inside this section at the given position If biome data did not exist before calling this method, the biome array is created then filled with UnknownBiomeCoordinates must be section-local
setBlockLight
Link copied to clipboard
fun setBlockLight(x: Int, y: Int, z: Int, light: Byte)
Sets the sky light in this section at the given position.
setSkyLight
Link copied to clipboard
fun setSkyLight(x: Int, y: Int, z: Int, light: Byte)
Sets the sky light in this section at the given position.
toNBT
Link copied to clipboard
fun toNBT(version: SupportedVersion = SupportedVersion.Latest): NBTCompound
Converts this ChunkSection into its NBT representation

Properties

biomes
Link copied to clipboard
var biomes: Array<String>? = null
May not exist.
blockLights
Link copied to clipboard
var blockLights: ByteArray
empty
Link copied to clipboard
val empty: Boolean
skyLights
Link copied to clipboard
var skyLights: ByteArray
y
Link copied to clipboard
val y: Byte