mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-11-10 20:45:10 +01:00
Fix #2539
This commit is contained in:
parent
826e29f0f3
commit
b4c0657d8b
@ -25,12 +25,14 @@ public class HosePulleyFluidHandler implements IFluidHandler {
|
|||||||
int diff = resource.getAmount();
|
int diff = resource.getAmount();
|
||||||
int totalAmountAfterFill = diff + internalTank.getFluidAmount();
|
int totalAmountAfterFill = diff + internalTank.getFluidAmount();
|
||||||
FluidStack remaining = resource.copy();
|
FluidStack remaining = resource.copy();
|
||||||
|
boolean deposited = false;
|
||||||
|
|
||||||
if (predicate.get() && totalAmountAfterFill >= 1000) {
|
if (predicate.get() && totalAmountAfterFill >= 1000) {
|
||||||
if (filler.tryDeposit(resource.getFluid(), rootPosGetter.get(), action.simulate())) {
|
if (filler.tryDeposit(resource.getFluid(), rootPosGetter.get(), action.simulate())) {
|
||||||
drainer.counterpartActed();
|
drainer.counterpartActed();
|
||||||
remaining.shrink(1000);
|
remaining.shrink(1000);
|
||||||
diff -= 1000;
|
diff -= 1000;
|
||||||
|
deposited = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -41,7 +43,7 @@ public class HosePulleyFluidHandler implements IFluidHandler {
|
|||||||
return resource.getAmount();
|
return resource.getAmount();
|
||||||
}
|
}
|
||||||
|
|
||||||
return internalTank.fill(remaining, action);
|
return internalTank.fill(remaining, action) + (deposited ? 1000 : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user