mirror of
https://github.com/GTNewHorizons/NotEnoughEnergistics.git
synced 2026-11-17 19:05:01 +00:00
fix bug
This commit is contained in:
1 parent
7d10998a74
commit
76614e44fb
1 file changed
+3
-2
@@ -55,10 +55,11 @@ public class PacketStackCountChange implements IMessage, IMessageHandler<PacketS
|
||||
Slot currentSlot = container.getSlot(message.getSlotIndex());
|
||||
for (int i = 0; i < Math.abs(message.getChangeCount()); i++) {
|
||||
int currentStackSize = message.getChangeCount() > 0 ? currentSlot.getStack().stackSize + 1 : currentSlot.getStack().stackSize - 1;
|
||||
if (currentSlot.getStack().stackSize >= currentSlot.getStack().getMaxStackSize() || currentSlot.getStack().stackSize - 1 <= 0) {
|
||||
if (currentStackSize <= currentSlot.getStack().getMaxStackSize() && currentStackSize > 0) {
|
||||
currentSlot.getStack().stackSize = currentStackSize;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
currentSlot.getStack().stackSize = currentStackSize;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
||||
Reference in new issue
Block a user