TerrainSampler 5.46.0
The terrain as structure starts see it (vanilla's ChunkGenerator.getBaseHeight() / getBaseColumn(): the noise terrain of a column, without generating the chunk). Built from the terrain filler (the native core when it runs), one chunk at a time, and kept in small least-recently-used caches: a packed column kind per block (KIND_*: air, solid, water, lava) and the WORLD_SURFACE_WG / OCEAN_FLOOR_WG heights.
Constants
KIND_AIR
php
public const KIND_AIR = 0KIND_LAVA
php
public const KIND_LAVA = 3KIND_SOLID
php
public const KIND_SOLID = 1KIND_WATER
php
public const KIND_WATER = 2OCEAN_FLOOR_WG
php
public const OCEAN_FLOOR_WG = 1WORLD_SURFACE_WG
php
public const WORLD_SURFACE_WG = 0Properties
$chunkFills
php
public int $chunkFills$height
php
public readonly int $height$minY
php
public readonly int $minYMethods
__construct()
php
public function __construct(\Closure $fill, int $minY, int $height, ?\Closure $knownHeights = null)chunkKinds()
php
public function chunkKinds(int $chunkX, int $chunkZ) : stringKind per block of a chunk's terrain (packed string).
getFirstFreeHeight()
php
public function getFirstFreeHeight(int $x, int $z, int $type) : intChunkGenerator.getFirstFreeHeight() / getBaseHeight(): first free y above the terrain of the column.
getFirstOccupiedHeight()
php
public function getFirstOccupiedHeight(int $x, int $z, int $type) : intChunkGenerator.getFirstOccupiedHeight(): the highest terrain block of the column.
getKind()
php
public function getKind(int $x, int $y, int $z) : intKind of the terrain block at a position (getBaseColumn()).
