I don't get it, this should work right? No error, just a single drop in-game. Has something changed recently? PHP: public function onBlockBreak(BlockBreakEvent $event) : void { ... var_dump($drops); $event->setDrops($drops);} Code: array(1) { [0]=> object(pocketmine\item\ItemBlock)#18620 (7) { ["blockId":protected]=> int(17) ["id":protected]=> int(17) ["meta":protected]=> int(0) ["tags":"pocketmine\item\Item":private]=> string(0) "" ["cachedNBT":"pocketmine\item\Item":private]=> NULL ["count"]=> int(4) ["name":protected]=> string(8) "Oak Wood" } }
nope, I want there to be four drops on the ground. I assume from your question then I need to have four different drops in the drop array?
No, what I am doing is setting the Item count for the drop'd Item. The Item still drops, but it drops a count of 1 and I want more than 1 What more code does one need to drop multiple items from one Item drop other than set the drop count? Either setDrops(Item[]) sets the drop count per Item or it doesn't and I need to add individual Item's to the array. That's fine, but I assumed and Item drop with a count greater than 1 would drop more than one item.
There is nothing else to see. BlockBreakEvent->setDrops($item[]) does it drop based on amount of items in the array or item->count for item? The contents of the array is in the first post of this thread.
NGL you are making no sense. All that code does is tell you what has been broken it doesn't multiply / add the amount of drops The code does nothing that you are showing besides that
Well since you only shown some code and the code shows no problems, the error is likely somewhere else. Is this the only plugin on the server? No code=debug it yourself