Skip to content

PlacedFeature 5.46.0 ​

final class · pocketmine\world\generator\vanilla\feature\PlacedFeature · source

A placed feature (worldgen/placed_feature): a configured feature and the placement modifiers that turn the origin into the positions where it is placed. Modifiers are applied depth-first, in order, like vanilla's FeaturePlacer.

Properties ​

$feature ​

php
public readonly \pocketmine\world\generator\vanilla\feature\Feature $feature

$id ​

php
public readonly string $id

Methods ​

__construct() ​

php
public function __construct(string $id, \pocketmine\world\generator\vanilla\feature\Feature $feature, array $modifiers)

place() ​

php
public function place(\pocketmine\world\generator\vanilla\feature\FeatureContext $c, int $x, int $y, int $z) : bool

PlacedFeature.place(): without biome check (nested features).

placeWithBiomeCheck() ​

php
public function placeWithBiomeCheck(\pocketmine\world\generator\vanilla\feature\FeatureContext $c, int $x, int $y, int $z) : bool

FeaturePlacer.placeWithBiomeCheck(): the biome filter modifier checks this feature against the biome.

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