From 144b09fe97a89fc9033fd5ec6be899adcefc2046 Mon Sep 17 00:00:00 2001 From: miozune Date: Tue, 17 Oct 2023 13:57:35 +0900 Subject: Remove AC_Helper_Utils which is actually never updated --- .../helpers/autocrafter/AC_Helper_Utils.java | 54 ---------------------- .../multi/production/GT4Entity_AutoCrafter.java | 13 ------ 2 files changed, 67 deletions(-) delete mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/autocrafter/AC_Helper_Utils.java (limited to 'src/main/java/gtPlusPlus/xmod/gregtech/common') diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/autocrafter/AC_Helper_Utils.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/autocrafter/AC_Helper_Utils.java deleted file mode 100644 index a3c33f0290..0000000000 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/autocrafter/AC_Helper_Utils.java +++ /dev/null @@ -1,54 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.helpers.autocrafter; - -import java.util.HashMap; -import java.util.Iterator; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.GT4Entity_AutoCrafter; - -public class AC_Helper_Utils { - - // AC maps - public static final Map sAutocrafterMap = new HashMap(); - - // Add Crafter - public static final int addCrafter(GT4Entity_AutoCrafter AC) { - if (!sAutocrafterMap.containsValue(AC)) { - int increase = sAutocrafterMap.size() + 1; - sAutocrafterMap.put(increase, AC); - Logger.INFO("[A-C] " + "Added Auto-Crafter to index on position " + increase + "."); - return increase; - } else { - Logger.INFO("[A-C] Tried adding an Auto-Crafter to Index, but found one already there."); - } - return 0; - } - - public static final boolean removeCrafter(GT4Entity_AutoCrafter AC) { - if (!sAutocrafterMap.isEmpty()) { - if (sAutocrafterMap.containsValue(AC)) { - sAutocrafterMap.remove(getIDByCrafter(AC)); - return true; - } - } - return false; - } - - public static final int getIDByCrafter(GT4Entity_AutoCrafter AC) { - if (!sAutocrafterMap.isEmpty()) { - Set> players = sAutocrafterMap.entrySet(); - Iterator> i = players.iterator(); - while (i.hasNext()) { - Entry current = i.next(); - if (current.getValue().equals(AC)) { - return current.getKey(); - } - } - } - Logger.WARNING("Failed. [getIDByCrafter]"); - return 0; - } -} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GT4Entity_AutoCrafter.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GT4Entity_AutoCrafter.java index e37a6783f5..25fe69da96 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GT4Entity_AutoCrafter.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GT4Entity_AutoCrafter.java @@ -30,7 +30,6 @@ import gregtech.api.util.GT_Utility; import gtPlusPlus.core.block.ModBlocks; import gtPlusPlus.core.lib.CORE; import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; -import gtPlusPlus.xmod.gregtech.common.helpers.autocrafter.AC_Helper_Utils; public class GT4Entity_AutoCrafter extends GregtechMeta_MultiBlockBase implements ISurvivalConstructable { @@ -179,18 +178,6 @@ public class GT4Entity_AutoCrafter extends GregtechMeta_MultiBlockBase