Merge remote-tracking branch 'lordIcocain/fix-math-for-cell-restriction' into dev

This commit is contained in:
Martin Robertz committed 2025-04-20 21:35:15 +02:00
commit 2c8fb5801e
1 file changed
+4 -2
@@ -397,8 +397,10 @@ public class FluidCellInventory implements IFluidCellInventory {
if (cardDistribution) {
remainingFluidCount = this.getRemainingFluidCountDist(null);
} else {
remainingFluidCount = this.getRemainingFluidCount()
- ((long) this.getBytesPerType() * singleByteAmount);
remainingFluidCount = Math.min(
getRemainingFluidCount(),
getFreeBytes() * singleByteAmount + getUnusedFluidCount()
- (long) getBytesPerType() * singleByteAmount);
}
if (remainingFluidCount > 0) {