mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 09:56:06 +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,8 +27,8 @@ use pocketmine\entity\Effect;
|
||||
|
||||
class GoldenAppleEnchanted extends GoldenApple{
|
||||
|
||||
public function __construct($meta = 0, $count = 1){
|
||||
Food::__construct(self::ENCHANTED_GOLDEN_APPLE, $meta, $count, "Enchanted Golden Apple"); //skip parent constructor
|
||||
public function __construct(int $meta = 0){
|
||||
Food::__construct(self::ENCHANTED_GOLDEN_APPLE, $meta, "Enchanted Golden Apple"); //skip parent constructor
|
||||
}
|
||||
|
||||
public function getAdditionalEffects() : array{
|
||||
|
Reference in New Issue
Block a user