Skip to content

MaterialRule 5.46.0 ​

abstract class · pocketmine\world\generator\vanilla\surface\rule\MaterialRule · source

Material rule (worldgen/material_rule): picks the block for the solid block in the context, or nothing.

Constants ​

NONE ​

php
public const NONE = -1

Methods ​

apply() ​

php
abstract public function apply(\pocketmine\world\generator\vanilla\surface\MaterialContext $c) : int

Returns a MaterialPalette id, or NONE.

compile() ​

php
abstract public function compile(\pocketmine\world\generator\vanilla\surface\MaterialRuleCompiler $compiler) : string

PHP statements that return the result of apply() if there is one and fall through otherwise, for MaterialRuleCompiler ($c, $x, $y, $z and $b are in scope).

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