mirror of
https://github.com/GTNewHorizons/AE2FluidCraft-Rework.git
synced 2026-11-11 15:57:55 +00:00
Fix cell math for distribution card (#291)
Co-authored-by: Maya <10861407+serenibyss@users.noreply.github.com>
This commit is contained in:
1 parent
6e613b33af
commit
c9cf92ca4a
1 file changed
+2
-5
@@ -226,12 +226,9 @@ public class FluidCellInventory implements IFluidCellInventory {
|
||||
if (types == 0) types = this.getTotalFluidTypes();
|
||||
if (l != null) {
|
||||
if (restrictionLong > 0) {
|
||||
remaining = Math.min((restrictionLong / types) - l.getStackSize(), this.getUnusedFluidCount());
|
||||
remaining = Math.min((restrictionLong / types) - l.getStackSize(), getRemainingFluidCount());
|
||||
} else {
|
||||
remaining = (((this.getTotalBytes() / types)
|
||||
- (int) Math.ceil((double) l.getStackSize() / singleByteAmount)
|
||||
- getBytesPerType()) * singleByteAmount)
|
||||
+ (singleByteAmount - l.getStackSize() % singleByteAmount);
|
||||
remaining = (((getTotalBytes() / types) - getBytesPerType()) * singleByteAmount) - l.getStackSize();
|
||||
}
|
||||
} else {
|
||||
if (restrictionLong > 0) {
|
||||
|
||||
Reference in new issue
Block a user