diff --git a/common/src/main/java/muramasa/antimatter/capability/FluidHandler.java b/common/src/main/java/muramasa/antimatter/capability/FluidHandler.java index 44ec7bf19..d63d3d1b6 100644 --- a/common/src/main/java/muramasa/antimatter/capability/FluidHandler.java +++ b/common/src/main/java/muramasa/antimatter/capability/FluidHandler.java @@ -165,7 +165,8 @@ public FluidHolder extractFluid(FluidHolder fluid, boolean simulate) { public FluidHolder extractFluid(long toExtract, boolean simulate) { if (getOutputTanks() != null){ for (int i = 0; i < getOutputTanks().getSize(); i++) { - FluidHolder fluid = getOutputTanks().extractFluid(getOutputTanks().getFluidInTank(i), simulate); + FluidHolder toExtractFluid = getOutputTanks().getFluidInTank(i); + FluidHolder fluid = getOutputTanks().extractFluid(toExtractFluid.copyWithAmount(Math.min(toExtractFluid.getFluidAmount(), toExtract)), simulate); if (!fluid.isEmpty()) return fluid; } }