Skip to content

BiomeClimate 5.46.0 ​

final class · pocketmine\world\weather\BiomeClimate · source

Rain flag and base temperature of the vanilla biomes (BedrockData biome_definitions.json "rain" and "temperature"), which decide whether it rains, snows or stays dry in a biome.

Constants ​

COOLING_PER_BLOCK ​

php
public const COOLING_PER_BLOCK = 0.05 / 40

Temperature lost per block above BiomeClimate::COOLING_START_Y (vanilla 0.05 / 40, without the noise).

COOLING_START_Y ​

php
public const COOLING_START_Y = 80

Above this height the temperature drops (vanilla: sea level + 17).

SNOW_TEMPERATURE ​

php
public const SNOW_TEMPERATURE = 0.15

Below this temperature it snows instead of raining (vanilla).

Methods ​

getBaseTemperature() ​

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

getPrecipitation() ​

php
public static function getPrecipitation(int $biomeId, int $y) : \pocketmine\world\weather\Precipitation

What falls at the given height of the biome when it rains.

getTemperatureAt() ​

php
public static function getTemperatureAt(int $biomeId, int $y) : float

Temperature of the biome at the given height: it gets colder above y=80, so high mountains get snow.

hasPrecipitation() ​

php
public static function hasPrecipitation(int $biomeId) : bool

Whether it ever rains (or snows) in the biome. False for deserts, savannas, badlands, the Nether and the End.

isCold() ​

php
public static function isCold(int $biomeId, int $y) : bool

Whether water freezes and snow settles at the given height of the biome (cold enough to snow).

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