fix cell restriction math

This commit is contained in:
lc_1337 committed 2025-11-11 10:25:19 +02:00
1 parent adee911b77
commit 70d5ff32ab
1 file changed
+7 -1
@@ -158,6 +158,7 @@ public class FluidCellInventory implements IFluidCellInventory {
final long bytesFree = this.getFreeBytes();
return (bytesFree > this.getBytesPerType()
|| (bytesFree == this.getBytesPerType() && this.getUnusedFluidCount() > 0))
&& (restrictionLong <= 0 || restrictionLong > getStoredFluidCount())
&& this.getRemainingFluidTypes() > 0;
}
@@ -360,7 +361,12 @@ public class FluidCellInventory implements IFluidCellInventory {
if (cardDistribution) {
remainingFluidSlots = this.getRemainingFluidCountDist(l);
} else {
remainingFluidSlots = this.getRemainingFluidCount();
if (restrictionLong > 0) {
remainingFluidSlots = this.getRemainingFluidCount();
} else {
remainingFluidSlots = this.getRemainingFluidCount()
- (long) this.getBytesPerType() * singleByteAmount;
}
}
if (remainingFluidSlots <= 0) {