Skip to content

SurfaceBiomes 5.46.0 ​

final class · pocketmine\world\generator\vanilla\surface\SurfaceBiomes · source

Block-level biome lookups during the surface stage, like vanilla's BiomeManager: the biome of a block is the one of the 4x4x4 cell corner closest to it after a seed-dependent "fiddle" of each corner (the fuzzy zoom), so biome borders are not aligned to the cell grid. Cells of the neighbouring chunks are computed from the climate noise.

Methods ​

__construct() ​

php
public function __construct(\pocketmine\world\generator\vanilla\NoiseRouter $router, \pocketmine\world\generator\vanilla\biome\ClimateBiomeTree $tree, int $seed, ?\pocketmine\world\generator\vanilla\compiler\CompiledKernel $kernel = null)

beginChunk() ​

php
public function beginChunk(\pocketmine\world\generator\vanilla\TerrainChunk $terrain) : void

getBiome() ​

php
public function getBiome(int $localX, int $y, int $localZ) : int

Biome index (ClimateBiomeTree names) at a block; $localX/$localZ are 0-15 inside the current chunk.

obfuscateSeed() ​

php
public static function obfuscateSeed(int $seed) : int

BiomeManager.obfuscateSeed(): first 8 bytes (little endian) of the SHA-256 of the seed (little endian).

VanillaMine is a fork of PocketMine-MP, maintained by Luxury Nodes. Not affiliated with the PMMP team or Mojang.