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

mal0ne-23 picture mal0ne-23  路  32Comments

Sandertv picture Sandertv  路  37Comments

admsteck picture admsteck  路  22Comments

Frago9876543210 picture Frago9876543210  路  50Comments

markkrueg picture markkrueg  路  18Comments