Skip to content

Commit 4507cd4

Browse files
authored
Fix Super/Quantum Tanks voiding incorrect fluid (GregTechCEu#1998)
1 parent c2b83c1 commit 4507cd4

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/main/java/gregtech/common/metatileentities/storage/MetaTileEntityQuantumTank.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -604,6 +604,12 @@ public QuantumFluidTank(int capacity) {
604604
@Override
605605
public int fillInternal(FluidStack resource, boolean doFill) {
606606
int accepted = super.fillInternal(resource, doFill);
607+
608+
// if we couldn't accept "resource", and "resource" is not the same as the stored fluid.
609+
if (accepted == 0 && !resource.isFluidEqual(getFluid())) {
610+
return 0;
611+
}
612+
607613
if (doFill && locked && lockedFluid == null) {
608614
lockedFluid = resource.copy();
609615
lockedFluid.amount = 1;

0 commit comments

Comments
 (0)