ChunkSectionReader

class ChunkSectionReader(version: SupportedVersion, nbt: NBTCompound)

Extracts section data from a NBTCompound. Does not cache nor convert the raw data. Use when you want to read parts of a section without having the memory overhead of ChunkSection.

Only two piece of information are cached with this object: the version of the parent chunk, which is used to know how to extract the section data, and the input NBT.

Can throw AnvilException if the NBT data is not recognized or incomplete.

For information on what the different fields extracted from the NBT are, see Chunk Format on the Minecraft wiki

Constructors

ChunkSectionReader
Link copied to clipboard
fun ChunkSectionReader(version: SupportedVersion, nbt: NBTCompound)

Types

Companion
Link copied to clipboard
object Companion

Functions

getBiomeInformation
Link copied to clipboard
fun getBiomeInformation(): SectionBiomeInformation
Returns the corresponding SectionBiomeInformation for this biome.
getBiomes
Link copied to clipboard
fun getBiomes(): NBTCompound?
Can be null if absent
getBlockLight
Link copied to clipboard
fun getBlockLight(): ImmutableByteArray?
Can be null if absent
getBlockPalette
Link copied to clipboard
fun getBlockPalette(): NBTList<NBTCompound>?
getCompactedBlockStates
Link copied to clipboard
fun getCompactedBlockStates(): ImmutableLongArray
getSkyLight
Link copied to clipboard
fun getSkyLight(): ImmutableByteArray?
Can be null if absent
getUncompressedBiomeIndices
Link copied to clipboard
fun getUncompressedBiomeIndices(): IntArray
getUncompressedBlockStateIDs
Link copied to clipboard
fun getUncompressedBlockStateIDs(): IntArray
hasBiomes
Link copied to clipboard
fun hasBiomes(): Boolean
Returns whether this section has biome info (since 1.
hasBlockStates
Link copied to clipboard
fun hasBlockStates(): Boolean
isSectionEmpty
Link copied to clipboard
fun isSectionEmpty(): Boolean

Properties

nbt
Link copied to clipboard
val nbt: NBTCompound
version
Link copied to clipboard
val version: SupportedVersion
y
Link copied to clipboard
val y: Byte
Gets the Y value of the section.