mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 10:22:56 +00:00
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:
@ -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{
|
||||
|
Reference in New Issue
Block a user