mirror of
https://github.com/Ellpeck/NaturesAura.git
synced 2024-12-22 14:59:22 +01:00
fixed the spring causing an overflow if connected to an overeager pipe
This commit is contained in:
parent
9eb52c3b71
commit
5c5988f8a7
1 changed files with 6 additions and 5 deletions
|
@ -143,17 +143,17 @@ public class TileEntitySpring extends TileEntityImpl implements ITickableTileEnt
|
|||
private class InfiniteTank implements IFluidTank {
|
||||
@Override
|
||||
public FluidStack getFluid() {
|
||||
return new FluidStack(Fluids.WATER, Integer.MAX_VALUE);
|
||||
return new FluidStack(Fluids.WATER, 1000);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFluidAmount() {
|
||||
return Integer.MAX_VALUE;
|
||||
return 1000;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCapacity() {
|
||||
return Integer.MAX_VALUE;
|
||||
return 1000;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -168,9 +168,10 @@ public class TileEntitySpring extends TileEntityImpl implements ITickableTileEnt
|
|||
|
||||
@Override
|
||||
public FluidStack drain(int maxDrain, IFluidHandler.FluidAction action) {
|
||||
int drain = Math.min(maxDrain, 1000);
|
||||
if (action.execute())
|
||||
TileEntitySpring.this.consumeAura(2 * maxDrain);
|
||||
return new FluidStack(Fluids.WATER, maxDrain);
|
||||
TileEntitySpring.this.consumeAura(2 * drain);
|
||||
return new FluidStack(Fluids.WATER, drain);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue