diff --git a/src/main/java/com/glodblock/github/common/storage/FluidCellInventory.java b/src/main/java/com/glodblock/github/common/storage/FluidCellInventory.java index 721e2912..646b88b6 100644 --- a/src/main/java/com/glodblock/github/common/storage/FluidCellInventory.java +++ b/src/main/java/com/glodblock/github/common/storage/FluidCellInventory.java @@ -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) {