From f78951bfea7f71a0b31207e58a48a1a936756184 Mon Sep 17 00:00:00 2001 From: lordIcocain Date: Sun, 20 Apr 2025 20:27:04 +0300 Subject: [PATCH] fix --- .../glodblock/github/common/storage/FluidCellInventory.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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 034f9889..436d458e 100644 --- a/src/main/java/com/glodblock/github/common/storage/FluidCellInventory.java +++ b/src/main/java/com/glodblock/github/common/storage/FluidCellInventory.java @@ -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) {