i was trying to make a plugin to register and implement enchanted books, but while i was placing more than 1 enchanted book in my inventory, it will revert and not transfer, it won't even drop the enchanted book on the ground, i even put 64 in getMaxStackSize() function, i can't find the problem thats causing this... plz help Version of pmmp is : 7b5df10 mcpe v1.2 OS: Windows P.S. 1 enchanted book works fine and even drops on ground
EnchantedBook.php -> Code: <?php declare(strict_types=1); namespace pocketmine\item; class EnchantedBook extends Item { public function __construct(int $meta = 0){ parent::__construct(self::ENCHANTED_BOOK, $meta, "Enchanted Book"); } public function getMaxStackSize() : int{ return 64; } } Registering -> Code: ItemFactory::registerItem(new Item(Item::ENCHANTED_BOOK, 0, "Enchanted Book"));
why are you constructing an Item instead of EnchantedBook? PHP: ItemFactory::registerItem(new EnchantedBook(Item::ENCHANTED_BOOK, 0, "Enchanted Book"));