DensityFunctionParser 5.46.0
Builds a seed-bound density function graph from vanilla JSON (port of deepslate's DensityFunction.fromJson + RandomState noise binding, MIT).
Noise settings with a legacy random source (Nether, End) bind some noises differently: the base 3D noise is seeded with a java.util.Random of the world seed, the Nether biome noises use the legacy octave initialization, and the End islands get the world seed.
Constants
LEGACY_NETHER_BIOME_NOISES
php
public const LEGACY_NETHER_BIOME_NOISES = ["minecraft:temperature" => 0, "minecraft:vegetation" => 1, "minecraft:nether/temperature" => 0, "minecraft:nether/vegetation" => 1]Noises created with the legacy Nether biome initialization in legacy worlds, with the offset added to the world seed for their random.
Methods
__construct()
php
public function __construct(\pocketmine\world\generator\vanilla\WorldgenData $data, \pocketmine\world\generator\vanilla\random\PositionalRandomFactory $random, ?int $legacySeed = null)getNoise()
php
public function getNoise(string $id) : \pocketmine\world\generator\vanilla\noise\NoiseStacknamed()
php
public function named(string $id) : \pocketmine\world\generator\vanilla\density\NamedFunctionnoiseParameters()
php
public static function noiseParameters(array $json) : \pocketmine\world\generator\vanilla\noise\NormalNoiseParametersparse()
php
public function parse(mixed $json) : \pocketmine\world\generator\vanilla\density\DensityFunction