diff --git a/src/dark/core/common/CoreRecipeLoader.java b/src/dark/core/common/CoreRecipeLoader.java index 4bb6884aa..746721511 100644 --- a/src/dark/core/common/CoreRecipeLoader.java +++ b/src/dark/core/common/CoreRecipeLoader.java @@ -8,6 +8,8 @@ import cpw.mods.fml.common.registry.GameRegistry; import dark.api.ProcessorRecipes; import dark.api.ProcessorRecipes.ProcessorType; import dark.core.common.blocks.BlockBasalt; +import dark.core.common.blocks.BlockOre; +import dark.core.common.blocks.BlockOre.OreData; import dark.core.common.items.EnumMaterial; import dark.core.common.items.EnumOrePart; import dark.core.common.items.ItemOreDirv; @@ -143,6 +145,18 @@ public class CoreRecipeLoader extends RecipeLoader } } + if(blockOre instanceof BlockOre) + { + for (OreData data : OreData.values()) + { + if (CoreRecipeLoader.itemMetals instanceof ItemOreDirv) + { + FurnaceRecipes.smelting().addSmelting(blockOre.blockID, data.ordinal(), EnumMaterial.getStack(data.mat, EnumOrePart.INGOTS, 1), 0.6f); + ProcessorRecipes.createRecipe(ProcessorType.CRUSHER, new ItemStack(blockOre.blockID, 1, data.ordinal()), EnumMaterial.getStack(data.mat, EnumOrePart.RUBBLE, 1)); + } + } + } + } public void loadStainGlass() diff --git a/src/dark/core/common/blocks/BlockOre.java b/src/dark/core/common/blocks/BlockOre.java index f4697d8e7..1bcde8830 100644 --- a/src/dark/core/common/blocks/BlockOre.java +++ b/src/dark/core/common/blocks/BlockOre.java @@ -73,20 +73,6 @@ public class BlockOre extends Block implements IExtraObjectInfo return Block.stone.getIcon(side, metadata); } - @Override - public void loadRecipes() - { - for (OreData data : OreData.values()) - { - if (CoreRecipeLoader.itemMetals instanceof ItemOreDirv) - { - ItemStack oreStack = new ItemStack(this.blockID, 1, data.ordinal()); - FurnaceRecipes.smelting().addSmelting(this.blockID, data.ordinal(), EnumMaterial.getStack(data.mat, EnumOrePart.INGOTS, 1), 0.6f); - ProcessorRecipes.createRecipe(ProcessorType.CRUSHER, oreStack, EnumMaterial.getStack(data.mat, EnumOrePart.RUBBLE, 1)); - } - } - } - @Override public void getTileEntities(int blockID, Set>> list) { diff --git a/src/dark/core/common/debug/BlockDebug.java b/src/dark/core/common/debug/BlockDebug.java index e60926ef1..188b20723 100644 --- a/src/dark/core/common/debug/BlockDebug.java +++ b/src/dark/core/common/debug/BlockDebug.java @@ -129,13 +129,6 @@ public class BlockDebug extends BlockMachine implements IExtraObjectInfo } - @Override - public void loadRecipes() - { - // TODO Auto-generated method stub - - } - @Override public void loadOreNames() { diff --git a/src/dark/core/common/machines/BlockBasicMachine.java b/src/dark/core/common/machines/BlockBasicMachine.java index d027ed1f1..e5536c943 100644 --- a/src/dark/core/common/machines/BlockBasicMachine.java +++ b/src/dark/core/common/machines/BlockBasicMachine.java @@ -106,13 +106,6 @@ public class BlockBasicMachine extends BlockMachine implements IExtraObjectInfo { } - @Override - public void loadRecipes() - { - // TODO Auto-generated method stub - - } - @Override public void loadOreNames() { diff --git a/src/dark/core/common/machines/BlockSolarPanel.java b/src/dark/core/common/machines/BlockSolarPanel.java index fea31ce55..ff09bc570 100644 --- a/src/dark/core/common/machines/BlockSolarPanel.java +++ b/src/dark/core/common/machines/BlockSolarPanel.java @@ -72,13 +72,6 @@ public class BlockSolarPanel extends BlockMachine implements IExtraObjectInfo wattStorm = (float) (config.get("settings", "WattStorm", 6).getDouble(6) / 1000); } - @Override - public void loadRecipes() - { - // TODO Auto-generated method stub - - } - @Override public void loadOreNames() { diff --git a/src/dark/core/common/transmit/BlockWire.java b/src/dark/core/common/transmit/BlockWire.java index 40466f19b..cd9f14a32 100644 --- a/src/dark/core/common/transmit/BlockWire.java +++ b/src/dark/core/common/transmit/BlockWire.java @@ -224,13 +224,6 @@ public class BlockWire extends BlockMachine implements IExtraObjectInfo } } - @Override - public void loadRecipes() - { - // TODO Auto-generated method stub - - } - @Override public void getTileEntities(int blockID, Set>> list) { diff --git a/src/dark/core/prefab/IExtraObjectInfo.java b/src/dark/core/prefab/IExtraObjectInfo.java index 1a560c0b6..cf7dbbd16 100644 --- a/src/dark/core/prefab/IExtraObjectInfo.java +++ b/src/dark/core/prefab/IExtraObjectInfo.java @@ -8,7 +8,7 @@ import dark.core.prefab.helpers.Pair; /** Used to handle info about the block that would normally be handled by the mod main class. Use the * BlockRegistry in order for these methods to be called on load of the mod. - * + * * @author DarkGuardsman */ public interface IExtraObjectInfo { @@ -25,9 +25,6 @@ public interface IExtraObjectInfo * graphics, or crafting cost */ public void loadExtraConfigs(Configuration config); - /** Optional way to handle recipes based out of the block/item class */ - public void loadRecipes(); - /** Loads the names used to reference this item in a recipe */ public void loadOreNames(); diff --git a/src/dark/core/prefab/machine/BlockMulti.java b/src/dark/core/prefab/machine/BlockMulti.java index 0382d7354..0f239373d 100644 --- a/src/dark/core/prefab/machine/BlockMulti.java +++ b/src/dark/core/prefab/machine/BlockMulti.java @@ -160,13 +160,6 @@ public class BlockMulti extends BlockContainer implements IExtraObjectInfo } - @Override - public void loadRecipes() - { - // TODO Auto-generated method stub - - } - @Override public void loadOreNames() { diff --git a/src/dark/core/registration/ModObjectRegistry.java b/src/dark/core/registration/ModObjectRegistry.java index 83462e077..799138917 100644 --- a/src/dark/core/registration/ModObjectRegistry.java +++ b/src/dark/core/registration/ModObjectRegistry.java @@ -62,8 +62,8 @@ public class ModObjectRegistry } if (block != null) { - ModObjectRegistry.finishCreation(block, null); ModObjectRegistry.registerBlock(block, itemClass, name, modID); + ModObjectRegistry.finishCreation(block, null); } } return block; @@ -109,8 +109,8 @@ public class ModObjectRegistry } } - ModObjectRegistry.finishCreation(block, buildData); ModObjectRegistry.registerBlock(block, buildData.itemBlock, buildData.blockName, modID); + ModObjectRegistry.finishCreation(block, buildData); } } catch (Exception x) @@ -207,7 +207,6 @@ public class ModObjectRegistry extraBlockConfig.save(); } ((IExtraObjectInfo) block).loadOreNames(); - ((IExtraObjectInfo) block).loadRecipes(); Set>> tileListNew = new HashSet>>(); ((IExtraObjectInfo) block).getTileEntities(block.blockID, tileListNew); for (Pair> par : tileListNew)