Block: Replace Color and WoodType magic numbers with type-safe objects

this provides automatic type safety without the need for magic number value checking everywhere.
This commit is contained in:
Dylan K. Taylor
2019-02-12 13:52:59 +00:00
parent 18440f612f
commit 7b3993730a
25 changed files with 422 additions and 250 deletions

View File

@@ -24,6 +24,7 @@ declare(strict_types=1);
namespace pocketmine\level\biome;
use pocketmine\block\Block;
use pocketmine\block\utils\TreeType;
use pocketmine\level\ChunkManager;
use pocketmine\level\generator\populator\Populator;
use pocketmine\utils\Random;
@@ -98,7 +99,7 @@ abstract class Biome{
self::register(self::SMALL_MOUNTAINS, new SmallMountainsBiome());
self::register(self::BIRCH_FOREST, new ForestBiome(ForestBiome::TYPE_BIRCH));
self::register(self::BIRCH_FOREST, new ForestBiome(TreeType::$BIRCH));
}
/**