diff --git a/src/main/java/techreborn/client/container/builder/BuiltContainer.java b/src/main/java/techreborn/client/container/builder/BuiltContainer.java index 083ce1e34..249cb1066 100644 --- a/src/main/java/techreborn/client/container/builder/BuiltContainer.java +++ b/src/main/java/techreborn/client/container/builder/BuiltContainer.java @@ -52,16 +52,16 @@ final class BuiltContainer extends Container { for (final Range range : this.playerSlotRanges) if (range.contains(index)) { - this.shiftToTile(stackInSlot); - shifted = true; + if (this.shiftToTile(stackInSlot)) + shifted = true; break; } if (!shifted) for (final Range range : this.tileSlotRanges) if (range.contains(index)) { - this.shiftToPlayer(stackInSlot); - shifted = true; + if (this.shiftToPlayer(stackInSlot)) + shifted = true; break; } @@ -93,7 +93,7 @@ final class BuiltContainer extends Container { slot.onSlotChanged(); changed = true; } else if (stackInSlot.getCount() < max) { - stackToShift.setCount(-(max - stackInSlot.getCount())); + stackToShift.shrink(max - stackInSlot.getCount()); stackInSlot.setCount(max); slot.onSlotChanged(); changed = true;