diff --git a/ee3_common/com/pahimar/ee3/EquivalentExchange3.java b/ee3_common/com/pahimar/ee3/EquivalentExchange3.java index dee465ec..be5e7a65 100644 --- a/ee3_common/com/pahimar/ee3/EquivalentExchange3.java +++ b/ee3_common/com/pahimar/ee3/EquivalentExchange3.java @@ -152,9 +152,6 @@ public class EquivalentExchange3 { // Initialize custom rendering and pre-load textures (Client only) proxy.initRenderingAndTextures(); - // Load the Transmutation Stone recipes - //RecipesTransmutationStone.init(); - // Add in the ability to dye Alchemical Bags CraftingManager.getInstance().getRecipeList().add(new RecipesAlchemicalBagDyes()); diff --git a/ee3_common/com/pahimar/ee3/core/addons/AddonRedPower2.java b/ee3_common/com/pahimar/ee3/core/addons/AddonRedPower2.java deleted file mode 100644 index 0ae8d918..00000000 --- a/ee3_common/com/pahimar/ee3/core/addons/AddonRedPower2.java +++ /dev/null @@ -1,45 +0,0 @@ -package com.pahimar.ee3.core.addons; - -import net.minecraft.block.Block; -import net.minecraft.item.ItemStack; - -import com.pahimar.ee3.core.util.LogHelper; -import com.pahimar.ee3.core.util.RecipeHelper; -import com.pahimar.ee3.recipe.RecipesTransmutationStone; - -import cpw.mods.fml.common.Loader; - -/** - * Equivalent-Exchange-3 - * - * AddonRedPower2 - * - * @author pahimar - * @license Lesser GNU Public License v3 (http://www.gnu.org/licenses/lgpl.html) - * - */ -public class AddonRedPower2 { - - public static Block rp2Stone = null; - - public static void initWorld() { - - if (Loader.isModLoaded("RedPowerWorld")) { - try { - rp2Stone = (Block) Class.forName("com.eloraam.redpower.RedPowerWorld").getField("blockStone").get(null); - - for (ItemStack stone : RecipesTransmutationStone.transmutationStones) { - // Extremely temporary recipe - RecipeHelper.addRecipe(new ItemStack(rp2Stone.blockID, 1, 3), stone, Block.cobblestone, Block.cobblestone, Block.cobblestone, Block.cobblestone, Block.cobblestone, Block.cobblestone); - } - - LogHelper.info("Loaded RP2 World addon"); - } - catch (Exception e) { - LogHelper.severe("Could not load RP2 World addon"); - e.printStackTrace(System.err); - } - } - } - -} diff --git a/ee3_common/com/pahimar/ee3/core/handlers/AddonHandler.java b/ee3_common/com/pahimar/ee3/core/handlers/AddonHandler.java index abd911d9..439a16ba 100644 --- a/ee3_common/com/pahimar/ee3/core/handlers/AddonHandler.java +++ b/ee3_common/com/pahimar/ee3/core/handlers/AddonHandler.java @@ -1,7 +1,5 @@ package com.pahimar.ee3.core.handlers; -import com.pahimar.ee3.core.addons.AddonRedPower2; - /** * Equivalent-Exchange-3 * @@ -15,7 +13,6 @@ public class AddonHandler { public static void init() { - AddonRedPower2.initWorld(); } } diff --git a/ee3_common/com/pahimar/ee3/core/util/ItemUtil.java b/ee3_common/com/pahimar/ee3/core/util/ItemUtil.java index 467cffa3..6b181538 100644 --- a/ee3_common/com/pahimar/ee3/core/util/ItemUtil.java +++ b/ee3_common/com/pahimar/ee3/core/util/ItemUtil.java @@ -1,15 +1,11 @@ package com.pahimar.ee3.core.util; -import java.util.ArrayList; -import java.util.List; - import net.minecraft.entity.EntityLiving; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraftforge.oredict.OreDictionary; -import com.pahimar.ee3.item.CustomWrappedStack; import com.pahimar.ee3.item.ModItems; import com.pahimar.ee3.lib.Colours; import com.pahimar.ee3.lib.Strings; @@ -91,42 +87,6 @@ public class ItemUtil { return false; } - public static ArrayList collateStacks(List unCollatedStacks) { - - ArrayList collatedStacks = new ArrayList(); - - for (int i = 0; i < unCollatedStacks.size(); i++) { - - if (collatedStacks.size() == 0) { - collatedStacks.add(unCollatedStacks.get(i)); - } - else { - boolean found = false; - - for (int j = 0; j < collatedStacks.size(); j++) { - if (unCollatedStacks.get(i).getWrappedStack() instanceof ItemStack && collatedStacks.get(j).getWrappedStack() instanceof ItemStack) { - if (compare((ItemStack) unCollatedStacks.get(i).getWrappedStack(), (ItemStack) collatedStacks.get(j).getWrappedStack())) { - collatedStacks.get(j).setStackSize(collatedStacks.get(j).getStackSize() + 1); - found = true; - } - } - else if (unCollatedStacks.get(i).getWrappedStack() instanceof OreStack && collatedStacks.get(j).getWrappedStack() instanceof OreStack) { - if (OreStack.compareStacks((OreStack) unCollatedStacks.get(i).getWrappedStack(), (OreStack) collatedStacks.get(j).getWrappedStack())) { - collatedStacks.get(j).setStackSize(collatedStacks.get(j).getStackSize() + 1); - found = true; - } - } - } - - if (!found) { - collatedStacks.add(unCollatedStacks.get(i)); - } - } - } - - return collatedStacks; - } - public static boolean hasColor(ItemStack itemStack) { return !itemStack.hasTagCompound() ? false : !itemStack.getTagCompound().hasKey(Strings.NBT_ITEM_DISPLAY) ? false : itemStack.getTagCompound().getCompoundTag(Strings.NBT_ITEM_DISPLAY).hasKey(Strings.NBT_ITEM_COLOR); diff --git a/ee3_common/com/pahimar/ee3/core/util/RecipeHelper.java b/ee3_common/com/pahimar/ee3/core/util/RecipeHelper.java index 1f72bd74..0e234c1a 100644 --- a/ee3_common/com/pahimar/ee3/core/util/RecipeHelper.java +++ b/ee3_common/com/pahimar/ee3/core/util/RecipeHelper.java @@ -2,11 +2,8 @@ package com.pahimar.ee3.core.util; import java.util.ArrayList; -import net.minecraft.block.Block; -import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.CraftingManager; -import net.minecraft.item.crafting.FurnaceRecipes; import net.minecraft.item.crafting.IRecipe; import net.minecraft.item.crafting.ShapedRecipes; import net.minecraft.item.crafting.ShapelessRecipes; @@ -16,8 +13,6 @@ import net.minecraftforge.oredict.ShapelessOreRecipe; import com.pahimar.ee3.item.CustomWrappedStack; -import cpw.mods.fml.common.registry.GameRegistry; - /** * Equivalent-Exchange-3 * @@ -172,194 +167,4 @@ public class RecipeHelper { return recipeInputs; } - - public static ArrayList getCollatedRecipeInputs(IRecipe recipe) { - - return ItemUtil.collateStacks(getRecipeInputs(recipe)); - } - - public static ArrayList getReverseRecipes(CustomWrappedStack wrappedStack) { - - ArrayList reverseRecipeList = new ArrayList(); - - @SuppressWarnings("unchecked") - ArrayList recipeList = new ArrayList(CraftingManager.getInstance().getRecipeList()); - - for (IRecipe recipe : recipeList) { - - if (recipe.getRecipeOutput() != null) { - - if (wrappedStack.getWrappedStack() instanceof ItemStack) { - - if (ItemUtil.compare((ItemStack) wrappedStack.getWrappedStack(), recipe.getRecipeOutput())) { - reverseRecipeList.add(recipe); - } - } - else if (wrappedStack.getWrappedStack() instanceof OreStack) { - - if (OreDictionary.getOreID(recipe.getRecipeOutput()) != -1) { - // TODO Generalize comparison of OreStacks and OreStacks|ItemStacks - if (OreDictionary.getOreID(((OreStack) wrappedStack.getWrappedStack()).oreName) == OreDictionary.getOreID(recipe.getRecipeOutput())) { - reverseRecipeList.add(recipe); - } - } - } - } - } - - return reverseRecipeList; - } - - public static void addRecipe(ItemStack output, Object... input) { - - GameRegistry.addShapelessRecipe(output, input); - } - - public static void addRecipe(ItemStack output, ItemStack transmutationStone, Object... input) { - - Object[] inputs = new Object[input.length + 1]; - System.arraycopy(input, 0, inputs, 0, input.length); - inputs[input.length] = transmutationStone; - - addRecipe(output, inputs); - } - - public static void addRecipe(Block output, Object... input) { - - addRecipe(new ItemStack(output), input); - } - - public static void addRecipe(Block output, int count, Object... input) { - - addRecipe(new ItemStack(output, count), input); - } - - public static void addRecipe(Item output, Object... input) { - - addRecipe(new ItemStack(output), input); - } - - public static void addRecipe(Item output, int count, Object... input) { - - addRecipe(new ItemStack(output, count), input); - } - - public static Object[] getMetaCycle(Object input, int n) { - - ArrayList list = new ArrayList(); - - ItemStack stack; - - for (int i = 0; i < n; i++) { - stack = GeneralHelper.convertObjectToItemStack(input); - stack.setItemDamage(i); - list.add(stack); - } - - return list.toArray(); - } - - public static Object[] getMetaCycle(Object input, int n, int... excludedMeta) { - - ArrayList list = new ArrayList(); - - ItemStack stack; - int i = 0; - while (i < n) { - for (int j : excludedMeta) { - if (i == j) { - ++i; - } - } - - if (!(i < n)) { - break; - } - - stack = GeneralHelper.convertObjectToItemStack(input); - stack.setItemDamage(i); - list.add(stack); - ++i; - } - - return list.toArray(); - } - - /* - * Pass this a Block, Item or ItemStack and the maximum number of indexes, - * EXCLUDING zero - */ - protected static void addMetaCycleRecipe(Object input, ItemStack stone, int n) { - - int outputI; - - /* - * Makes a single item cycle through its meta values when it's crafted - * with a PStone - */ - for (int i = 0; i < n; i++) { - outputI = i == n - 1 ? 0 : i + 1; - - if (input instanceof Block) { - GameRegistry.addShapelessRecipe(new ItemStack((Block) input, 1, outputI), stone, new ItemStack((Block) input, 1, i)); - } - else if (input instanceof Item) { - GameRegistry.addShapelessRecipe(new ItemStack((Item) input, 1, outputI), stone, new ItemStack((Item) input, 1, i)); - } - else if (input instanceof ItemStack) { - GameRegistry.addShapelessRecipe(new ItemStack(((ItemStack) input).itemID, 1, outputI), stone, new ItemStack(((ItemStack) input).itemID, 1, i)); - } - } - } - - protected static void addMetaCycleRecipe(Object input, ItemStack stone, int n, int... excludedMeta) { - - int i = 0; - int outputI = 1; - while (i < n && outputI != 0) { - outputI = i == n - 1 ? 0 : i + 1; - - for (int j : excludedMeta) { - if (outputI == j) { - outputI = (outputI + 1) % 16; - } - } - - if (input instanceof Block) { - GameRegistry.addShapelessRecipe(new ItemStack((Block) input, 1, outputI), stone, new ItemStack((Block) input, 1, i)); - } - else if (input instanceof Item) { - GameRegistry.addShapelessRecipe(new ItemStack((Item) input, 1, outputI), stone, new ItemStack((Item) input, 1, i)); - } - else if (input instanceof ItemStack) { - GameRegistry.addShapelessRecipe(new ItemStack(((ItemStack) input).itemID, 1, outputI), stone, new ItemStack(((ItemStack) input).itemID, 1, i)); - } - - i = outputI; - } - } - - public static void addSmeltingRecipe(ItemStack input, ItemStack stone, ItemStack fuel) { - - ItemStack result = FurnaceRecipes.smelting().getSmeltingResult(input); - - if (input == null || input.getItem() == null || result == null) - return; - - Object[] list = new Object[9]; - list[0] = stone; - list[1] = fuel; - - for (int i = 2; i < 9; i++) { - list[i] = new ItemStack(input.getItem(), 1, input.getItemDamage()); - } - - if (result.stackSize * 7 <= result.getItem().getItemStackLimit()) { - GameRegistry.addShapelessRecipe(new ItemStack(result.getItem(), result.stackSize * 7, result.getItemDamage()), list); - } - else { - GameRegistry.addShapelessRecipe(new ItemStack(result.getItem(), result.getItem().getItemStackLimit(), result.getItemDamage()), list); - } - } - } diff --git a/ee3_common/com/pahimar/ee3/item/crafting/RecipeRegistry.java b/ee3_common/com/pahimar/ee3/item/crafting/RecipeRegistry.java index 8ff983c9..e8c47395 100644 --- a/ee3_common/com/pahimar/ee3/item/crafting/RecipeRegistry.java +++ b/ee3_common/com/pahimar/ee3/item/crafting/RecipeRegistry.java @@ -88,6 +88,7 @@ public class RecipeRegistry { Iterator recipeKeySetIterator = recipeKeySet.iterator(); CustomWrappedStack recipeOutput = null; + // Discover all stacks involved in the recipes we know about while (recipeKeySetIterator.hasNext()) { recipeOutput = recipeKeySetIterator.next(); @@ -98,13 +99,16 @@ public class RecipeRegistry { for (List recipeInputs : recipes.get(recipeOutput)) { for (CustomWrappedStack recipeInput : recipeInputs) { - if (!discoveredStacks.contains(new CustomWrappedStack(recipeInput.getWrappedStack()))) { - discoveredStacks.add(new CustomWrappedStack(recipeInput.getWrappedStack())); + CustomWrappedStack unwrappedRecipeInput = new CustomWrappedStack(recipeInput.getWrappedStack()); + + if (!discoveredStacks.contains(unwrappedRecipeInput)) { + discoveredStacks.add(unwrappedRecipeInput); } } } } + // Discover all stacks from the vanilla Items array ArrayList subItemList = new ArrayList(); for (int i = 0; i < Item.itemsList.length; i++) { @@ -121,7 +125,6 @@ public class RecipeRegistry { if (!discoveredStacks.contains(customWrappedStack)) { discoveredStacks.add(customWrappedStack); - recipelessStacks.add(customWrappedStack); } } } @@ -132,11 +135,22 @@ public class RecipeRegistry { if (!discoveredStacks.contains(customWrappedStack)) { discoveredStacks.add(customWrappedStack); - recipelessStacks.add(customWrappedStack); } } } } + + /* + * For every stack we have discovered, check to see if we know a recipe for it. If we don't + * and we haven't already added it to the recipeless stack list, add it to the recipeless stack + * list + */ + for (CustomWrappedStack discoveredStack : discoveredStacks) { + + if (recipes.get(discoveredStack).size() == 0 && !recipelessStacks.contains(discoveredStack)) { + recipelessStacks.add(discoveredStack); + } + } } public boolean hasRecipe(CustomWrappedStack customWrappedStack) { diff --git a/ee3_common/com/pahimar/ee3/recipe/RecipesTransmutationStone.java b/ee3_common/com/pahimar/ee3/recipe/RecipesTransmutationStone.java deleted file mode 100644 index f7bf1631..00000000 --- a/ee3_common/com/pahimar/ee3/recipe/RecipesTransmutationStone.java +++ /dev/null @@ -1,216 +0,0 @@ -package com.pahimar.ee3.recipe; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Iterator; -import java.util.List; -import java.util.Map; - -import net.minecraft.block.Block; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.FurnaceRecipes; -import net.minecraftforge.oredict.OreDictionary; - -import com.pahimar.ee3.core.handlers.EquivalencyHandler; -import com.pahimar.ee3.core.util.GeneralHelper; -import com.pahimar.ee3.core.util.RecipeHelper; -import com.pahimar.ee3.item.ModItems; -import com.pahimar.ee3.lib.Reference; - -import cpw.mods.fml.common.ObfuscationReflectionHelper; - -/** - * Equivalent-Exchange-3 - * - * RecipesTransmutationStone - * - * @author pahimar - * @license Lesser GNU Public License v3 (http://www.gnu.org/licenses/lgpl.html) - * - */ -public class RecipesTransmutationStone { - - private static ItemStack philStone = new ItemStack(ModItems.philStone, 1, OreDictionary.WILDCARD_VALUE); - private static ItemStack miniumStone = new ItemStack(ModItems.miniumStone, 1, OreDictionary.WILDCARD_VALUE); - - public static List transmutationStones = Arrays.asList(miniumStone, philStone); - - private static ItemStack anyCoal = new ItemStack(Item.coal, 1, OreDictionary.WILDCARD_VALUE); - private static ItemStack anyWood = new ItemStack(Block.wood, 1, OreDictionary.WILDCARD_VALUE); - private static ItemStack anyPlank = new ItemStack(Block.planks, 1, OreDictionary.WILDCARD_VALUE); - private static ItemStack anySandStone = new ItemStack(Block.sandStone, 1, OreDictionary.WILDCARD_VALUE); - private static ItemStack dyeBoneMeal = new ItemStack(Item.dyePowder, 1, 15); - - public static void init() { - - initEquivalencyList(); - - for (ItemStack stone : transmutationStones) { - initTransmutationRecipes(stone); - initEquivalenceRecipes(stone); - //initReconstructiveRecipes(stone); - initDestructorRecipes(stone); - initPortableSmeltingRecipes(stone); - } - - if (Reference.DEBUG_MODE) { - EquivalencyHandler.instance().debug(); - } - } - - public static void initTransmutationRecipes(ItemStack transmutationStone) { - - /* 4 Cobble <-> 1 Flint */ - RecipeHelper.addRecipe(Item.flint, transmutationStone, Block.cobblestone, Block.cobblestone, Block.cobblestone, Block.cobblestone); - RecipeHelper.addRecipe(new ItemStack(Block.cobblestone, 4), transmutationStone, Item.flint); - - /* 4 Dirt <-> 1 Gravel */ - RecipeHelper.addRecipe(Block.gravel, transmutationStone, Block.dirt, Block.dirt, Block.dirt, Block.dirt); - RecipeHelper.addRecipe(new ItemStack(Block.dirt, 4), transmutationStone, Block.gravel); - - /* 4 Sand <-> 1 Sandstone */ - // Vanilla Recipes exist to make SandStone from 4 Sand - RecipeHelper.addRecipe(new ItemStack(Block.sand, 4), transmutationStone, anySandStone); - - /* 2 Sticks -> Wood Plank */ - RecipeHelper.addRecipe(Block.planks, transmutationStone, Item.stick, Item.stick); - // Vanilla recipe exists to make sticks from planks - - /* 4 Wood Planks -> Wood Block */ - RecipeHelper.addRecipe(Block.wood, transmutationStone, anyPlank, anyPlank, anyPlank, anyPlank); - // Vanilla recipes exist to make planks from any wood log - - /* 4 Gravel/Sandstone/Flint -> 1 Clay Ball, 1 Clay Ball -> 4 Gravel */ - RecipeHelper.addRecipe(Item.clay, transmutationStone, Block.gravel, Block.gravel, Block.gravel, Block.gravel); - RecipeHelper.addRecipe(Item.clay, transmutationStone, anySandStone, anySandStone, anySandStone, anySandStone); - RecipeHelper.addRecipe(Item.clay, transmutationStone, Item.flint, Item.flint, Item.flint, Item.flint); - RecipeHelper.addRecipe(new ItemStack(Block.gravel, 4), transmutationStone, Item.clay); - - /* 2 Wood Log <-> 1 Obsidian */ - RecipeHelper.addRecipe(Block.obsidian, transmutationStone, anyWood, anyWood); - RecipeHelper.addRecipe(new ItemStack(Block.wood, 2), transmutationStone, Block.obsidian); - - /* 4 Clay Ball <-> 1 Clay Block */ - // Vanilla recipe exists to make clay blocks from clay balls - RecipeHelper.addRecipe(new ItemStack(Item.clay, 4), transmutationStone, Block.blockClay); - - /* 4 Obsidian/Clay Block -> 1 Iron Ingot, Iron Ingot -> Clay Block */ - RecipeHelper.addRecipe(Item.ingotIron, transmutationStone, Block.obsidian, Block.obsidian, Block.obsidian, Block.obsidian); - RecipeHelper.addRecipe(Item.ingotIron, transmutationStone, Block.blockClay, Block.blockClay, Block.blockClay, Block.blockClay); - RecipeHelper.addRecipe(new ItemStack(Block.blockClay, 4), transmutationStone, Item.ingotIron); - - /* 8 Iron Ingot <-> 1 Gold Ingot */ - RecipeHelper.addRecipe(Item.ingotGold, transmutationStone, Item.ingotIron, Item.ingotIron, Item.ingotIron, Item.ingotIron, Item.ingotIron, Item.ingotIron, Item.ingotIron, Item.ingotIron); - RecipeHelper.addRecipe(new ItemStack(Item.ingotIron, 8), transmutationStone, Item.ingotGold); - - /* 4 Gold Ingot <-> 1 Diamond */ - RecipeHelper.addRecipe(Item.diamond, transmutationStone, Item.ingotGold, Item.ingotGold, Item.ingotGold, Item.ingotGold); - RecipeHelper.addRecipe(new ItemStack(Item.ingotGold, 4), transmutationStone, Item.diamond); - - /* 8 Iron Block <-> 1 Gold Block */ - RecipeHelper.addRecipe(Block.blockGold, transmutationStone, Block.blockIron, Block.blockIron, Block.blockIron, Block.blockIron, Block.blockIron, Block.blockIron, Block.blockIron, Block.blockIron); - RecipeHelper.addRecipe(new ItemStack(Block.blockIron, 8), transmutationStone, Block.blockGold); - - /* 4 Gold Block <-> 1 Diamond Block */ - RecipeHelper.addRecipe(Block.blockDiamond, transmutationStone, Block.blockGold, Block.blockGold, Block.blockGold, Block.blockGold); - RecipeHelper.addRecipe(new ItemStack(Block.blockGold, 4), transmutationStone, Block.blockDiamond); - - /* 1 Ender Pearl <-> 4 Iron Ingot */ - RecipeHelper.addRecipe(Item.enderPearl, transmutationStone, Item.ingotIron, Item.ingotIron, Item.ingotIron, Item.ingotIron); - RecipeHelper.addRecipe(new ItemStack(Item.ingotIron, 4), transmutationStone, Item.enderPearl); - } - - public static void initEquivalenceRecipes(ItemStack stone) { - - int outputI; - - for (ArrayList itemStackList : EquivalencyHandler.instance().getAllLists()) { - ItemStack[] currentList = new ItemStack[itemStackList.size()]; - currentList = itemStackList.toArray(currentList); - - for (int i = 0; i < currentList.length; i++) { - outputI = i == currentList.length - 1 ? 0 : i + 1; - - RecipeHelper.addRecipe(currentList[outputI], stone, GeneralHelper.convertSingleStackToPluralStacks(currentList[i])); - } - } - } - - public static void initReconstructiveRecipes(ItemStack stone) { - - /* 3 Bone Meal --> 1 Bone */ - RecipeHelper.addRecipe(Item.bone, stone, dyeBoneMeal, dyeBoneMeal, dyeBoneMeal); - - /* 2 Blaze Powder --> 1 Blaze Rod */ - RecipeHelper.addRecipe(Item.blazeRod, stone, Item.blazePowder, Item.blazePowder); - } - - public static void initDestructorRecipes(ItemStack stone) { - - /* Smooth Stone -> Cobble Stone */ - RecipeHelper.addRecipe(Block.cobblestone, stone, Block.stone); - - /* Glass -> Sand */ - RecipeHelper.addRecipe(Block.sand, stone, Block.glass); - - /* Glowstone Block -> 4 Glowstone Dust */ - RecipeHelper.addRecipe(new ItemStack(Item.lightStoneDust, 4), stone, Block.glowStone); - - /* Brick Block -> 4 Bricks */ - RecipeHelper.addRecipe(new ItemStack(Item.brick, 4), stone, Block.brick); - } - - @SuppressWarnings("rawtypes") - public static void initPortableSmeltingRecipes(ItemStack stone) { - - Map furnaceMap = FurnaceRecipes.smelting().getSmeltingList(); - Map furnaceMetaMap = ObfuscationReflectionHelper.getPrivateValue(FurnaceRecipes.class, FurnaceRecipes.smelting(), "metaSmeltingList"); - - Iterator iterFurnaceKeyMap = furnaceMap.keySet().iterator(); - Iterator iterFurnaceMetaKeyMap = furnaceMetaMap.keySet().iterator(); - - Integer furnaceMapKey; - List furnaceMetaMapKey; - - ItemStack unSmeltedStack; - - while (iterFurnaceKeyMap.hasNext()) { - furnaceMapKey = (Integer) iterFurnaceKeyMap.next(); - unSmeltedStack = new ItemStack(furnaceMapKey, 1, 0); - - RecipeHelper.addSmeltingRecipe(unSmeltedStack, stone, anyCoal); - } - - while (iterFurnaceMetaKeyMap.hasNext()) { - furnaceMetaMapKey = (List) iterFurnaceMetaKeyMap.next(); - unSmeltedStack = new ItemStack((Integer) furnaceMetaMapKey.get(0), 1, (Integer) furnaceMetaMapKey.get(1)); - - RecipeHelper.addSmeltingRecipe(unSmeltedStack, stone, anyCoal); - } - } - - protected static void initEquivalencyList() { - - EquivalencyHandler.instance().addObjects(Block.sand, Block.dirt, Block.cobblestone, Block.grass); - EquivalencyHandler.instance().addObjects(Block.plantYellow, Block.plantRed); - EquivalencyHandler.instance().addObjects(Block.mushroomRed, Block.mushroomBrown); - EquivalencyHandler.instance().addObjects(Item.pumpkinSeeds, Item.melonSeeds); - EquivalencyHandler.instance().addObjects(Block.pumpkin, Block.melon); - EquivalencyHandler.instance().addObjects(Block.pumpkinStem, Block.melonStem); - EquivalencyHandler.instance().addObjects(Block.stairsWoodSpruce, Block.stairsWoodBirch, Block.stairsWoodJungle); - EquivalencyHandler.instance().addObjects(new ItemStack(Item.paper, 3), new ItemStack(Item.reed, 3)); - EquivalencyHandler.instance().addObjects(new ItemStack(Item.flint, 2), new ItemStack(Block.gravel, 2), new ItemStack(Block.sandStone, 2, 0), new ItemStack(Block.sandStone, 2, 1), new ItemStack(Block.sandStone, 2, 2)); - EquivalencyHandler.instance().addObjects(RecipeHelper.getMetaCycle(Block.planks, 4)); - EquivalencyHandler.instance().addObjects(RecipeHelper.getMetaCycle(Block.wood, 4)); - EquivalencyHandler.instance().addObjects(RecipeHelper.getMetaCycle(Block.woodSingleSlab, 4)); - EquivalencyHandler.instance().addObjects(RecipeHelper.getMetaCycle(Block.woodDoubleSlab, 4)); - EquivalencyHandler.instance().addObjects(RecipeHelper.getMetaCycle(Block.sapling, 4)); - EquivalencyHandler.instance().addObjects(RecipeHelper.getMetaCycle(Block.leaves, 4)); - EquivalencyHandler.instance().addObjects(RecipeHelper.getMetaCycle(Block.tallGrass, 3)); - EquivalencyHandler.instance().addObjects(RecipeHelper.getMetaCycle(Block.cloth, 16)); - EquivalencyHandler.instance().addObjects(RecipeHelper.getMetaCycle(Block.stoneBrick, 4)); - EquivalencyHandler.instance().addObjects(RecipeHelper.getMetaCycle(Item.dyePowder, 16, 3, 4, 15)); - } - -}