mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 10:22:56 +00:00
Removed redundant count parameter from item constructors, added some documentation and tightened safety checks
the count parameter is useless since Item ctor should now only be used for constructing item _types_, not actual items. All item creations for inventories etc, should go through the ItemFactory.
This commit is contained in:
@ -27,9 +27,9 @@ use pocketmine\block\Block;
|
||||
use pocketmine\block\BlockFactory;
|
||||
|
||||
class WoodenDoor extends Item{
|
||||
public function __construct($meta = 0, $count = 1){
|
||||
public function __construct(int $meta = 0){
|
||||
$this->block = BlockFactory::get(Block::WOODEN_DOOR_BLOCK);
|
||||
parent::__construct(self::WOODEN_DOOR, $meta, $count, "Wooden Door");
|
||||
parent::__construct(self::WOODEN_DOOR, $meta, "Wooden Door");
|
||||
}
|
||||
|
||||
public function getMaxStackSize(){
|
||||
|
Reference in New Issue
Block a user