Skip to content

BiomeFilter 5.46.0 ​

final class · pocketmine\world\mobs\spawn\BiomeFilter · source

Evaluates the "minecraft:biome_filter" of Bedrock spawn rules: Minecraft filters ("all_of", "any_of", "none_of", a list meaning all of them, or a single test) with the tests used by the vanilla rules:

  • has_biome_tag: the biome has the tag (biome_definitions.json tags such as "monster", "ocean", "spawn_ghast");
  • is_snow_covered: snow falls in the biome (base temperature below 0.15). Operators: "==" / "equals" (default) and "!=" / "not" / "<>". Unknown tests fail, so a rule using them never spawns rather than spawning everywhere.

Methods ​

test() ​

php
public static function test(mixed $filter, array $tags, bool $snowCovered) : bool

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