Fixed overflow when using max upgrades, closes #1

This commit is contained in:
Buuz135 2021-12-29 12:08:20 +01:00
parent 948b87a657
commit bc01ad7098

View File

@ -91,7 +91,7 @@ public abstract class BigInventoryHandler implements IItemHandler, INBTSerializa
@Override @Override
public int getSlotLimit(int slot) { public int getSlotLimit(int slot) {
if (hasDowngrade()) return 64; if (hasDowngrade()) return 64;
return Math.min(Integer.MAX_VALUE, type.getSlotAmount() * getMultiplier()); return (int) Math.min(Integer.MAX_VALUE, type.getSlotAmount() * (long) getMultiplier());
} }
@Override @Override