$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.
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.
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.