Restocking upgrade restocks items that aren't being used
papachabre opened this issue ยท 1 comments
Issue Description:
When a backpack is equipped that contains a restocking upgrade, the backpack will restock items in the inventory if more of that item is picked up, rather than just if the item is being used. This causes the backpack to dump stacks of items into the player's inventory as items are picked up.
What happens:
Picking up two of an item can cause the backpack to restock that item even if a stack is already present in the hotbar.
What you expected to happen:
Picking up an item should not trigger the backpack to restock it. Only using the item should trigger it.
Steps to reproduce (important):
- Create a backpack with a restocking upgrade and set it to restock torches
- Equip the backpack
- Place a stack of torches in the backpack and one in the hotbar
- Place two torches in the world. The backpack will restock the stack in the hotbar
- Break one torch and pick it up. A single torch shows up in your inventory.
- Break the second torch and pick it up. The backpack restocks that stack, which removes the remaining torches from the backpack to do so.
These steps can be repeated similarly for more stacks as well. For example, even if the backpack is full of torches, placing them in the world then breaking them and picking them up will eventually empty the contents of the backpack into the inventory of the player.
Affected Versions (Do not use "latest"):
- IronBackpacks: 2.2.25
- Minecraft: 1.10.2
- Forge: 12.18.3.2281
- Other Conflicting Mods (may be irrelevant to your issue): No mods that are used for inventory manipulation were used in testing this issue.