mirror of
https://github.com/GTNewHorizons/AE2FluidCraft-Rework.git
synced 2026-11-12 08:17:32 +00:00
Resolves Multi-Fluid Distribution Limit Check Only Evaluating First 5 Partition Slots (#362)
This commit is contained in:
1 parent
0d5f682d3a
commit
219f8c313a
1 file changed
+7
-3
@@ -219,12 +219,16 @@ public class FluidCellInventory implements IFluidCellInventory {
|
||||
public long getRemainingFluidCountDist(IAEFluidStack l) {
|
||||
long remaining;
|
||||
long types = 0;
|
||||
for (int i = 0; i < this.getTotalFluidTypes(); i++) {
|
||||
if (this.getConfigInventory().getStackInSlot(i) != null) {
|
||||
long maxFluidTypes = this.getTotalFluidTypes();
|
||||
IInventory configInventory = this.getConfigInventory();
|
||||
for (int i = 0; i < configInventory.getSizeInventory(); i++) {
|
||||
// Check all partition slots to determine min distribution behaviour until max fluid types is reached
|
||||
if (types >= maxFluidTypes) break;
|
||||
if (configInventory.getStackInSlot(i) != null) {
|
||||
types++;
|
||||
}
|
||||
}
|
||||
if (types == 0) types = this.getTotalFluidTypes();
|
||||
if (types == 0) types = maxFluidTypes;
|
||||
if (l != null) {
|
||||
if (restrictionLong > 0) {
|
||||
remaining = Math.min((restrictionLong / types) - l.getStackSize(), getRemainingFluidCount());
|
||||
|
||||
Reference in new issue
Block a user