NativeDecorator 5.46.0
Decoration features placed by the native core (native/vanillagen/decor), on the connection of the generator's NativeTerrainClient.
The native side keeps its own copy of the decoration region (sent by begin(), as Java block states) and places the features it implements, in the global feature order, in batches of consecutive features (place()). Both sides apply every write of the other in order: the writes of PHP features and structures are logged by FeatureLevel and sent with the next batch, and the native writes come back and are applied with FeatureLevel::setState(). The result is exactly the PHP decoration.
Properties
$stats
public array $statsTime (ns) and counters for benchmarks: begin, place (whole requests), apply (PHP side of the native writes), writes, batches.
$unsupported
public array $unsupportedFeatures left to PHP and why (from the native side), for diagnostics.
Methods
__construct()
public function __construct(\pocketmine\world\generator\vanilla\native\NativeTerrainClient $client, \pocketmine\world\generator\vanilla\feature\block\JavaBlocks $blocks, int $minY, int $height, int $seaLevel, array $biomeNames, array $bedrockToJava, array $terrainToRegistry, array $stepFeatures)begin()
public function begin(\pocketmine\world\generator\vanilla\feature\FeatureLevel $level, int $chunkX, int $chunkZ, array $recordedHeights) : voidSends the decoration region (after FeatureLevel::begin()).
isNative()
public function isNative(int $step, int $index) : boolnativeCount()
public function nativeCount() : intplace()
public function place(\pocketmine\world\generator\vanilla\feature\FeatureLevel $level, \pocketmine\world\generator\vanilla\feature\FeatureRandom $random, int $decorationSeed, array $features) : voidPlaces a batch of consecutive natively placed features (in order) and applies their writes to the level.
