Minor Stuff
This commit is contained in:
parent
389d74b0ba
commit
371189814b
2 changed files with 3 additions and 0 deletions
|
@ -90,11 +90,13 @@ public class TransactorSimple extends Transactor {
|
|||
if (space >= remaining) {
|
||||
if (doAdd) {
|
||||
stackInSlot.stackSize += remaining;
|
||||
inventory.setInventorySlotContents(slot, stackInSlot);
|
||||
}
|
||||
return remaining;
|
||||
} else {
|
||||
if (doAdd) {
|
||||
stackInSlot.stackSize = stackInSlot.getMaxStackSize();
|
||||
inventory.setInventorySlotContents(slot, stackInSlot);
|
||||
}
|
||||
return space;
|
||||
}
|
||||
|
|
|
@ -62,6 +62,7 @@ public class InventoryUtil {
|
|||
int itemsToMove = stack.getMaxStackSize() - stack.stackSize;
|
||||
stack.stackSize += itemsToMove;
|
||||
stackToMove.stackSize -= itemsToMove;
|
||||
_inventory.setInventorySlotContents(i, stackToMove);
|
||||
}
|
||||
}
|
||||
return stackToMove;
|
||||
|
|
Loading…
Reference in a new issue