Dylan K. Taylor c70b80c273
ItemEntity: implement partial itemstack pickups in the dumbest way possible
Given the various limitations and flexibilities posed by EntityItemPickupEvent, I settled on this as the simplest way to deal with the problem.

- EntityItemPickupEvent may have its destination inventory changed, so we can't cache the result of getAddableItemQuantity() to use after the event.
- The item itself may have changed, so even if we thought we could add some items before the change, we might not be able to afterwards.

Considering the above facts, it's better to just give the whole itemstack to EntityItemPickupEvent, and let plugins use getAddableItemQuantity() on their own to decide if their chosen inventory can accommodate the item or not.
If it can't, then we'll just drop it on the ground.
This also fixes a potential issue where plugins changing the item to a custom one might end up with their items and the actual items both just vanishing if the target inventory was full.
closes #4499
2021-10-17 22:37:49 +01:00
..
2021-10-13 23:00:38 +01:00
2021-09-03 21:25:06 +01:00
2020-01-22 11:55:03 +00:00
2021-10-13 20:31:24 +01:00
2021-10-14 15:56:50 +01:00
2021-10-15 17:15:46 +01:00
2021-10-07 20:16:54 +01:00
2021-10-13 00:02:01 +01:00