Fixed inventory pull overshooting

This commit is contained in:
aidancbrady committed 2017-04-20 20:14:59 -04:00
1 parent b7fec78709
commit ccb342ead7
1 file changed
+3 -2
@@ -69,8 +69,9 @@ public final class InvStack
for(int i = 0; i < slotIDs.size(); i++)
{
ItemStack stack = itemStacks.get(i);
handler.extractItem(slotIDs.get(i), stack.getCount(), false);
amount -= stack.getCount();
int toUse = Math.min(amount, stack.getCount());
handler.extractItem(slotIDs.get(i), toUse, false);
amount -= toUse;
if(amount == 0)
{