Heightmap

class Heightmap

Represents a heightmap for a 16x16 area.

Constructors

Heightmap
Link copied to clipboard
fun Heightmap(compactVersion: ImmutableLongArray, version: SupportedVersion = SupportedVersion.Latest)
Constructs the heightmap from a compressed heightmap (36 longs long)
Heightmap
Link copied to clipboard
fun Heightmap()

Functions

compact
Link copied to clipboard
fun compact(version: SupportedVersion = SupportedVersion.Latest): ImmutableLongArray
Creates a compressed version of this heightmap, to be transferred over network, or saved to disk.
get
Link copied to clipboard
operator fun get(x: Int, z: Int): Int
Gets the height saved at the given coordinates.
set
Link copied to clipboard
operator fun set(x: Int, z: Int, height: Int)
Sets the height saved at the given coordinates.