From 04514282c08ebefdb3e68a46db34092f72be2316 Mon Sep 17 00:00:00 2001 From: miozune Date: Wed, 17 May 2023 00:01:01 +0900 Subject: Remove a lot of unused classes (#629) --- .../api/helpers/GregtechPlusPlus_API.java | 174 --------------------- 1 file changed, 174 deletions(-) (limited to 'src/main/java/gtPlusPlus/api/helpers') diff --git a/src/main/java/gtPlusPlus/api/helpers/GregtechPlusPlus_API.java b/src/main/java/gtPlusPlus/api/helpers/GregtechPlusPlus_API.java index a85bd42213..24d2da3134 100644 --- a/src/main/java/gtPlusPlus/api/helpers/GregtechPlusPlus_API.java +++ b/src/main/java/gtPlusPlus/api/helpers/GregtechPlusPlus_API.java @@ -2,26 +2,13 @@ package gtPlusPlus.api.helpers; import java.util.HashMap; -import net.minecraft.block.Block; -import net.minecraft.item.ItemStack; - import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.data.WeightedCollection; import gtPlusPlus.api.objects.minecraft.multi.SpecialMultiBehaviour; -import gtPlusPlus.core.lib.CORE; import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Energy_RTG; import gtPlusPlus.xmod.gregtech.api.util.SpecialBehaviourTooltipHandler; public class GregtechPlusPlus_API { - public static class MolecularTransformer_API { - - public static boolean addRecipe(ItemStack aInput, ItemStack aOutput, int aDuration, int aEU) { - return CORE.RA.addMolecularTransformerRecipe(aInput, aOutput, aDuration, aEU, 1); - } - } - public static class Multiblock_API { private static final HashMap mSpecialBehaviourItemMap = new HashMap(); @@ -50,166 +37,5 @@ public class GregtechPlusPlus_API { public static final HashMap getSpecialBehaviourItemMap() { return mSpecialBehaviourItemMap; } - - /** - * Allows RTG Fuel pellets from other mods to be used in the RTG hatch. - * - * @param aStack - The Pellet Stack, sanitsed after passing through. - * @param aFuelValue - The Fuel Value of the Pellet to be added to the energy storage. - * @return - Did register? - */ - public static boolean registerPelletForRtgHatch(ItemStack aStack, long aFuelValue) { - return GT_MetaTileEntity_Hatch_Energy_RTG.registerPelletForHatch(aStack, aFuelValue); - } - } - - public static class VoidMiner_API { - - private static final HashMap>> mMinerLootCache; - - static { - mMinerLootCache = new HashMap>>(); - } - - /** - * - * Registers an ore block for a dimension. Uses a default weight of 100. - * - * @param aDim - The Dimension ID - * @param aOredictName - The OreDict name of the Ore to be mined. - * @return - If there was a valid Block found in the OreDict for the provided name. - */ - public static boolean registerOreForVoidMiner(int aDim, String aOredictName) { - return registerOreForVoidMiner(aDim, aOredictName, 100); - } - - /** - * - * Registers an ore block for a dimension. Uses a default weight of 100. - * - * @param aDim - The Dimension ID - * @param aOredictName - The OreDict name of the Ore to be mined. - * @param aWeight - The weight of this ore Block. - * @return - If there was a valid Block found in the OreDict for the provided name. - */ - public static boolean registerOreForVoidMiner(int aDim, String aOredictName, int aWeight) { - Block b = null; - ItemStack[] aValidItems = ItemUtils.validItemsForOreDict(aOredictName); - for (ItemStack g : aValidItems) { - if (g != null) { - b = Block.getBlockFromItem(g.getItem()); - if (b != null) { - break; - } - } - } - if (b != null) { - registerOreForVoidMiner(aDim, b, aWeight); - return true; - } - return false; - } - - /** - * Registers an ore block for a dimension. Uses a default weight of 100. - * - * @param aDim - The Dimension ID - * @param aOreBlock - The Ore Block to be mined. - */ - public static void registerOreForVoidMiner(int aDim, Block aOreBlock) { - registerOreForVoidMiner(aDim, aOreBlock, 100); - } - - /** - * Registers an ore block for a dimension. - * - * @param aDim - The Dimension ID - * @param aOreBlock - The Ore Block to be mined. - * @param aWeight - The weight of this ore Block. - */ - public static void registerOreForVoidMiner(int aDim, Block aOreBlock, int aWeight) { - GregtechPlusPlus_API_Internal.writeBlockToDimensionInCache(aDim, 0, aOreBlock, aWeight); - } - - /** - * Registers a surface block for a dimension. Uses a default weight of 100. - * - * @param aDim - The Dimension ID - * @param aDirtBlock - The Dirt/Grass Block to be mined. - */ - public static void registerEarthSurfaceForVoidMiner(int aDim, Block aDirtBlock) { - registerEarthSurfaceForVoidMiner(aDim, aDirtBlock, 100); - } - - /** - * Registers a surface block for a dimension. - * - * @param aDim - The Dimension ID - * @param aDirtBlock - The Dirt/Grass Block to be mined. - * @param aWeight - The weight of this Dirt/Grass Block. - */ - public static void registerEarthSurfaceForVoidMiner(int aDim, Block aDirtBlock, int aWeight) { - GregtechPlusPlus_API_Internal.writeBlockToDimensionInCache(aDim, 0, aDirtBlock, aWeight); - } - - /** - * Registers a stone block for a dimension. Uses a default weight of 100. - * - * @param aDim - The Dimension ID - * @param aStoneBlock - The Stone Block to be mined. - */ - public static void registerEarthStoneForVoidMiner(int aDim, Block aStoneBlock) { - registerEarthStoneForVoidMiner(aDim, aStoneBlock, 100); - } - - /** - * Registers a stone block for a dimension. - * - * @param aDim - The Dimension ID - * @param aStoneBlock - The Stone Block to be mined. - * @param aWeight - The weight of this Stone Block. - */ - public static void registerEarthStoneForVoidMiner(int aDim, Block aStoneBlock, int aWeight) { - GregtechPlusPlus_API_Internal.writeBlockToDimensionInCache(aDim, 0, aStoneBlock, aWeight); - } - - public static WeightedCollection getAllRegisteredOresForDimension(int aDim) { - return mMinerLootCache.get(aDim).get("ore"); - } - - public static WeightedCollection getAllRegisteredDirtTypesForDimension(int aDim) { - return mMinerLootCache.get(aDim).get("dirt"); - } - - public static WeightedCollection getAllRegisteredStoneTypesForDimension(int aDim) { - return mMinerLootCache.get(aDim).get("stone"); - } - - public static final HashMap>> getVoidMinerLootCache() { - return mMinerLootCache; - } - } - - private static class GregtechPlusPlus_API_Internal { - - private static void writeBlockToDimensionInCache(int aDim, int aType, Block aBlock, int aWeight) { - HashMap> aDimMap = VoidMiner_API.mMinerLootCache.get(aDim); - if (aDimMap == null) { - aDimMap = new HashMap>(); - } - WeightedCollection aMappedBlocks = getBlockMap(aType, aDimMap); - aMappedBlocks.put(aWeight, aBlock); - } - - private static WeightedCollection getBlockMap(int aType, - HashMap> aDimMap) { - WeightedCollection aMappedBlocks; - String aTypeName = ((aType == 0) ? "ore" : (aType == 1) ? "dirt" : (aType == 2) ? "stone" : "error"); - aMappedBlocks = aDimMap.get(aTypeName); - if (aMappedBlocks == null) { - aMappedBlocks = new WeightedCollection(); - } - return aMappedBlocks; - } } } -- cgit