mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 02:42:58 +00:00
Biome: Added UnknownBiome class to avoid astonishing behaviour on unknown biomes
This commit is contained in:
@ -107,7 +107,10 @@ abstract class Biome{
|
||||
* @return Biome
|
||||
*/
|
||||
public static function getBiome(int $id) : Biome{
|
||||
return self::$biomes[$id] ?? self::$biomes[self::OCEAN];
|
||||
if(self::$biomes[$id] === null){
|
||||
self::register($id, new UnknownBiome());
|
||||
}
|
||||
return self::$biomes[$id];
|
||||
}
|
||||
|
||||
public function clearPopulators(){
|
||||
|
Reference in New Issue
Block a user