Merge branch 'master' into acquirable

This commit is contained in:
TheMode 2021-04-23 17:29:52 +02:00
commit 17409ee737

View File

@ -98,12 +98,10 @@ public interface TransactionType {
final int itemAmount = stackingRule.getAmount(inventoryItem); final int itemAmount = stackingRule.getAmount(inventoryItem);
final int itemStackAmount = stackingRule.getAmount(itemStack); final int itemStackAmount = stackingRule.getAmount(itemStack);
if (itemStackAmount < itemAmount) { if (itemStackAmount < itemAmount) {
System.out.println(1);
itemChangesMap.put(i, stackingRule.apply(inventoryItem, itemAmount - itemStackAmount)); itemChangesMap.put(i, stackingRule.apply(inventoryItem, itemAmount - itemStackAmount));
itemStack = stackingRule.apply(itemStack, 0); itemStack = stackingRule.apply(itemStack, 0);
break; break;
} }
System.out.println(2);
itemChangesMap.put(i, stackingRule.apply(inventoryItem, 0)); itemChangesMap.put(i, stackingRule.apply(inventoryItem, 0));
itemStack = stackingRule.apply(itemStack, itemStackAmount - itemAmount); itemStack = stackingRule.apply(itemStack, itemStackAmount - itemAmount);
if (stackingRule.getAmount(itemStack) == 0) { if (stackingRule.getAmount(itemStack) == 0) {