Pocketmine-mp: BaseInventory->addItem() with a list of separate, stackable items puts each stack in its own slot

Created on 27 Sep 2017  路  2Comments  路  Source: pmmp/PocketMine-MP

Issue description

$inventory->addItem(
    Item::get(Item::PLANKS, 0, 16),
    Item::get(Item::PLANKS, 0, 16),
    Item::get(Item::PLANKS, 0, 16),
    Item::get(Item::PLANKS, 0, 16)
);

will put each of the stacks in a separate slot instead of combining them as expected.

Steps to reproduce the issue

  1. use the above code
  2. profit
API Reproduced

Most helpful comment

because that is vanilla behaviour. The current behaviour is off and quite annoying. You can see it when you close a crafting grid after failing to craft something.

All 2 comments

Why should the stacks combine instead of be individual?

because that is vanilla behaviour. The current behaviour is off and quite annoying. You can see it when you close a crafting grid after failing to craft something.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

XDqrkneZ picture XDqrkneZ  路  3Comments

L3ice picture L3ice  路  3Comments

RedstoneAlmeida picture RedstoneAlmeida  路  3Comments

Muqsit picture Muqsit  路  3Comments

Ox531 picture Ox531  路  3Comments