Skip to content

MobBiomeInfo 5.46.0 ​

final class · pocketmine\entity\utils\MobBiomeInfo · source

Biome tags and temperatures of the vanilla biome definitions (BedrockData biome_definitions.json), used to pick mob variants the way vanilla does ("spawns_snow_foxes", "spawns_cold_variant_frogs", "desert"...).

Methods ​

getKnownBiomeIds() ​

php
public static function getKnownBiomeIds() : array

Returns the IDs of all biomes with a vanilla definition.

getName() ​

php
public static function getName(\pocketmine\world\World $world, \pocketmine\math\Vector3 $pos) : string

Returns the Bedrock name of the biome without namespace (e.g. "mega_taiga"), or "" if unknown.

getTags() ​

php
public static function getTags(\pocketmine\world\World $world, \pocketmine\math\Vector3 $pos) : array

getTagsById() ​

php
public static function getTagsById(int $biomeId) : array

Returns the tags of the biome with this ID (empty if unknown).

getTemperature() ​

php
public static function getTemperature(\pocketmine\world\World $world, \pocketmine\math\Vector3 $pos) : float

Returns the base temperature of the biome (plains 0.8, snowy biomes below 0.15, deserts 2.0).

getTemperatureById() ​

php
public static function getTemperatureById(int $biomeId) : float

Returns the base temperature of the biome with this ID (0.8 if unknown).

hasTag() ​

php
public static function hasTag(\pocketmine\world\World $world, \pocketmine\math\Vector3 $pos, string $tag) : bool

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