BlockSurvival 5.46.0
Java's BlockState.canSurvive() for the blocks placed by features (Java 26.3 rules, mostly block tags), used by would_survive predicates and by the features that check it (simple_block, bamboo, root_system...). During worldgen the light level is 0 (the light engine has not run yet), which matters for mushrooms. Blocks without a rule (plain blocks) always survive.
Methods
__construct()
php
public function __construct(\pocketmine\world\generator\vanilla\feature\block\JavaBlocks $blocks)canAttachTo()
php
public function canAttachTo(\pocketmine\world\generator\vanilla\feature\FeatureLevel $level, int $x, int $y, int $z, int $direction) : boolMultifaceBlock.canAttachTo(): the neighbour face towards the block is full.
canSurvive()
php
public function canSurvive(\pocketmine\world\generator\vanilla\feature\FeatureLevel $level, int $state, int $x, int $y, int $z) : boolisSolidRender()
php
public function isSolidRender(int $state) : boolApproximation of BlockState.isSolidRender(): full cube that occludes (not leaves, glass or ice).
