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

@ -27,8 +27,8 @@ use pocketmine\block\Block;
use pocketmine\block\BlockFactory;
class Dye extends Item{
public function __construct(int $variant){
parent::__construct(self::DYE, $variant, "Dye");
public function __construct(int $variant, string $name){
parent::__construct(self::DYE, $variant, $name);
}
public function getBlock() : Block{