diff --git a/src/api/java/rebelkeithy/mods/metallurgy/api/IMetalSet.java b/src/api/java/rebelkeithy/mods/metallurgy/api/IMetalSet.java deleted file mode 100644 index 40dd5cfa6..000000000 --- a/src/api/java/rebelkeithy/mods/metallurgy/api/IMetalSet.java +++ /dev/null @@ -1,12 +0,0 @@ -package rebelkeithy.mods.metallurgy.api; - -import java.util.Map; - -public interface IMetalSet -{ - public IOreInfo getOreInfo(int metadata); - - public IOreInfo getOreInfo(String name); - - public Map getOreList(); -} diff --git a/src/api/java/rebelkeithy/mods/metallurgy/api/IOreInfo.java b/src/api/java/rebelkeithy/mods/metallurgy/api/IOreInfo.java deleted file mode 100644 index 4571c9bc4..000000000 --- a/src/api/java/rebelkeithy/mods/metallurgy/api/IOreInfo.java +++ /dev/null @@ -1,43 +0,0 @@ -package rebelkeithy.mods.metallurgy.api; - -import net.minecraft.item.ItemStack; - -public interface IOreInfo -{ - // Returns an array of OreDictionary keys of the dusts the make this if it's - // an alloy - // if it's not an alloy, this returns null - public String[] getAlloyRecipe(); - - public ItemStack getBlock(); - - public ItemStack getBrick(); - - // If this ore drops something other than itself, this returns the ItemStack - // of the drop, otherwise returns null - public ItemStack getDrop(); - - public int getDropAmountMax(); - - public int getDropAmountMin(); - - // Returns the itemstack of dust this ore crushes into, if no dust exists, - // returns null - public ItemStack getDust(); - - // Returns the itemstack of ingot for this ore, if no ingot exists, returns - // null - public ItemStack getIngot(); - - public String getName(); - - public ItemStack getOre(); - - public OreType getType(); - - public boolean isEnabled(); - - public int getBlockHarvestLevel(); - - public int getToolHarvestLevel(); -} diff --git a/src/api/java/rebelkeithy/mods/metallurgy/api/MetallurgyAPI.java b/src/api/java/rebelkeithy/mods/metallurgy/api/MetallurgyAPI.java deleted file mode 100644 index af6cfa926..000000000 --- a/src/api/java/rebelkeithy/mods/metallurgy/api/MetallurgyAPI.java +++ /dev/null @@ -1,56 +0,0 @@ -package rebelkeithy.mods.metallurgy.api; - -import java.lang.reflect.Field; - -public class MetallurgyAPI -{ - - // Values for name: "base", "precious", "nether", "fantasy", "ender", - // "utility", "vanilla" - public static IMetalSet getMetalSet(String name) - { - try - { - String className = "rebelkeithy.mods.metallurgy.metals.MetallurgyMetals"; - - if (name.equals("vanilla")) - { - className = "rebelkeithy.mods.metallurgy.vanilla.MetallurgyVanilla"; - } - - final Class metallurgyMetals = Class.forName(className); - final Field set = metallurgyMetals.getField(name + "Set"); - return (IMetalSet) set.get(null); - } catch (final NoSuchFieldException e) - { - // TODO Auto-generated catch block - e.printStackTrace(); - } catch (final SecurityException e) - { - // TODO Auto-generated catch block - e.printStackTrace(); - } catch (final ClassNotFoundException e) - { - // TODO Auto-generated catch block - e.printStackTrace(); - } catch (final IllegalArgumentException e) - { - // TODO Auto-generated catch block - e.printStackTrace(); - } catch (final IllegalAccessException e) - { - // TODO Auto-generated catch block - e.printStackTrace(); - } - - return null; - } - - public static String[] getMetalSetNames() - { - // TODO maybe put something to get runtime list here - final String[] names = - { "base", "precious", "nether", "fantasy", "ender", "utility", "vanilla" }; - return names; - } -} diff --git a/src/api/java/rebelkeithy/mods/metallurgy/api/OreType.java b/src/api/java/rebelkeithy/mods/metallurgy/api/OreType.java deleted file mode 100644 index 960c58222..000000000 --- a/src/api/java/rebelkeithy/mods/metallurgy/api/OreType.java +++ /dev/null @@ -1,19 +0,0 @@ -package rebelkeithy.mods.metallurgy.api; - -public enum OreType -{ - - ORE(true), CATALYST(true), ALLOY(false), RESPAWN(true), DROP(true); - - private boolean generates; - - OreType(boolean generates) - { - this.generates = generates; - } - - public boolean generates() - { - return generates; - } -} diff --git a/src/main/java/mekanism/common/Mekanism.java b/src/main/java/mekanism/common/Mekanism.java index 3ca0590fb..9114754a1 100644 --- a/src/main/java/mekanism/common/Mekanism.java +++ b/src/main/java/mekanism/common/Mekanism.java @@ -112,8 +112,6 @@ import net.minecraftforge.oredict.RecipeSorter.Category; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import rebelkeithy.mods.metallurgy.api.IOreInfo; -import rebelkeithy.mods.metallurgy.api.MetallurgyAPI; import codechicken.multipart.handler.MultipartProxy; import com.mojang.authlib.GameProfile; @@ -1076,65 +1074,6 @@ public class Mekanism * Integrates the mod with other mods -- registering items and blocks with the Forge Ore Dictionary * and adding machine recipes with other items' corresponding resources. */ - public void addIntegratedItems() - { - if(hooks.MetallurgyCoreLoaded) - { - try { - String[] setNames = {"base", "precious", "nether", "fantasy", "ender", "utility"}; - - for(String setName : setNames ) - { - for(IOreInfo oreInfo : MetallurgyAPI.getMetalSet(setName).getOreList().values()) - { - switch(oreInfo.getType()) - { - case ALLOY: - { - if(oreInfo.getIngot() != null && oreInfo.getDust() != null) - { - RecipeHandler.addCrusherRecipe(MekanismUtils.size(oreInfo.getIngot(), 1), MekanismUtils.size(oreInfo.getDust(), 1)); - } - - break; - } - case DROP: - { - ItemStack ore = oreInfo.getOre(); - ItemStack drop = oreInfo.getDrop(); - - if(drop != null && ore != null) - { - RecipeHandler.addEnrichmentChamberRecipe(MekanismUtils.size(ore, 1), MekanismUtils.size(drop, 12)); - } - - break; - } - default: - { - ItemStack ore = oreInfo.getOre(); - ItemStack dust = oreInfo.getDust(); - ItemStack ingot = oreInfo.getIngot(); - - if(ore != null && dust != null) - { - RecipeHandler.addEnrichmentChamberRecipe(MekanismUtils.size(ore, 1), MekanismUtils.size(dust, 2)); - RecipeHandler.addCombinerRecipe(MekanismUtils.size(dust, 8), MekanismUtils.size(ore, 1)); - } - - if(ingot != null && dust != null) - { - RecipeHandler.addCrusherRecipe(MekanismUtils.size(ingot, 1), MekanismUtils.size(dust, 1)); - } - - break; - } - } - } - } - } catch(Exception e) {} - } - } /** * Adds and registers all entities and tile entities. @@ -1382,8 +1321,6 @@ public class Mekanism MinecraftForge.EVENT_BUS.post(new BoxBlacklistEvent()); - addIntegratedItems(); - OreDictManager.init(); //Update the config-dependent recipes after the recipes have actually been added in the first place diff --git a/src/main/java/mekanism/common/integration/MekanismHooks.java b/src/main/java/mekanism/common/integration/MekanismHooks.java index e3e1d5f41..57e6fc758 100644 --- a/src/main/java/mekanism/common/integration/MekanismHooks.java +++ b/src/main/java/mekanism/common/integration/MekanismHooks.java @@ -41,9 +41,6 @@ public final class MekanismHooks public boolean CCLoaded = false; public boolean AE2Loaded = false; - public boolean MetallurgyCoreLoaded = false; - public boolean MetallurgyBaseLoaded = false; - public void hook() { if(Loader.isModLoaded("CoFHCore")) CoFHCoreLoaded = true; @@ -52,13 +49,6 @@ public final class MekanismHooks if(Loader.isModLoaded("ThermalExpansion")) TELoaded = true; if(Loader.isModLoaded("ComputerCraft")) CCLoaded = true; if(Loader.isModLoaded("appliedenergistics2")) AE2Loaded = true; - - if(Loader.isModLoaded("Metallurgy3Core")) - { - MetallurgyCoreLoaded = true; - - if(Loader.isModLoaded("Metallurgy3Base")) MetallurgyBaseLoaded = true; - } if(IC2Loaded) {