From 2ab22537fcb12a30858bdaf825d2a396211b34d5 Mon Sep 17 00:00:00 2001 From: Glease <4586901+Glease@users.noreply.github.com> Date: Fri, 24 Mar 2023 18:37:58 +0800 Subject: clean up hand pump code (#577) * clean up hand pump code * spotlessApply (#578) Co-authored-by: GitHub GTNH Actions <> --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- src/main/java/gtPlusPlus/core/item/tool/misc/GregtechPump.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/main/java/gtPlusPlus/core') diff --git a/src/main/java/gtPlusPlus/core/item/tool/misc/GregtechPump.java b/src/main/java/gtPlusPlus/core/item/tool/misc/GregtechPump.java index eed1fe42a3..9fb570d86c 100644 --- a/src/main/java/gtPlusPlus/core/item/tool/misc/GregtechPump.java +++ b/src/main/java/gtPlusPlus/core/item/tool/misc/GregtechPump.java @@ -42,6 +42,7 @@ import gregtech.api.interfaces.IItemContainer; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicTank; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_MultiInput; import gregtech.api.objects.ItemData; import gregtech.api.util.GT_LanguageManager; import gregtech.api.util.GT_ModHandler; @@ -1067,6 +1068,8 @@ public class GregtechPump extends Item implements ISpecialElectricItem, IElectri PlayerUtils.messagePlayer( aPlayer, "Drained " + mAmountInserted + "L of " + aStored.getLocalizedName() + "."); + } else { + drain(aStack, mAmountInserted); } return b; } @@ -1214,7 +1217,8 @@ public class GregtechPump extends Item implements ISpecialElectricItem, IElectri return null; } final IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();; - if (aMetaTileEntity == null) { + if (aMetaTileEntity == null || aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_MultiInput) { + // blacklist multiinput hatch as it's too complex return null; } if (aMetaTileEntity instanceof GT_MetaTileEntity_BasicTank) { -- cgit