mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 08:44:01 +00:00
Biome: make biomes list use an SplFixedArray
This commit is contained in:
parent
c8a87b14d5
commit
8c6161a4f2
@ -52,8 +52,8 @@ abstract class Biome{
|
||||
|
||||
public const MAX_BIOMES = 256;
|
||||
|
||||
/** @var Biome[] */
|
||||
private static $biomes = [];
|
||||
/** @var Biome[]|\SplFixedArray */
|
||||
private static $biomes;
|
||||
|
||||
/** @var int */
|
||||
private $id;
|
||||
@ -82,6 +82,8 @@ abstract class Biome{
|
||||
}
|
||||
|
||||
public static function init(){
|
||||
self::$biomes = new \SplFixedArray(self::MAX_BIOMES);
|
||||
|
||||
self::register(self::OCEAN, new OceanBiome());
|
||||
self::register(self::PLAINS, new PlainBiome());
|
||||
self::register(self::DESERT, new DesertBiome());
|
||||
|
Loading…
x
Reference in New Issue
Block a user