More work on common ore recipes/emc

This commit is contained in:
pahimar 2013-12-16 15:50:23 -05:00
parent 6e6dfac1f6
commit 5863efcee6
6 changed files with 36 additions and 20 deletions

View file

@ -4,7 +4,8 @@ import com.pahimar.ee3.block.ModBlocks;
import com.pahimar.ee3.command.CommandHandler;
import com.pahimar.ee3.configuration.ConfigurationHandler;
import com.pahimar.ee3.core.handler.*;
import com.pahimar.ee3.core.handler.addon.AddonIMCHandler;
import com.pahimar.ee3.addon.AddonIMCHandler;
import com.pahimar.ee3.core.helper.DebugHelper;
import com.pahimar.ee3.core.helper.LogHelper;
import com.pahimar.ee3.core.helper.VersionHelper;
import com.pahimar.ee3.core.proxy.CommonProxy;

View file

@ -1,4 +1,4 @@
package com.pahimar.ee3.core.handler.addon;
package com.pahimar.ee3.addon;
import com.pahimar.ee3.api.StackValueMapping;
import com.pahimar.ee3.emc.EmcValue;

View file

@ -1,4 +1,4 @@
package com.pahimar.ee3.core.handler.addon;
package com.pahimar.ee3.addon;
/**
* Equivalent-Exchange-3

View file

@ -1,4 +1,4 @@
package com.pahimar.ee3.core.handler.addon;
package com.pahimar.ee3.addon;
import com.pahimar.ee3.api.RecipeMapping;
import com.pahimar.ee3.imc.InterModCommsOperations;
@ -98,6 +98,7 @@ public class AddonRecipes
/**
* Tin
*/
sendAddRecipe(new OreStack("ingotTin"), new OreStack("dustTin"));
/**
* Uranium

View file

@ -38,31 +38,41 @@ public class RecipeRegistry
private void init()
{
// Add potion recipes
for (WrappedStack outputStack : RecipesPotions.getPotionRecipes().keySet()) {
for (List<WrappedStack> inputStacks : RecipesPotions.getPotionRecipes().get(outputStack)) {
recipeMap.put(outputStack, inputStacks);
}
}
// TODO Decide if all recipe registration should be handled via IMC
// Add recipes in the vanilla crafting manager
for (WrappedStack outputStack : RecipesVanilla.getVanillaRecipes().keySet()) {
for (List<WrappedStack> inputStacks : RecipesVanilla.getVanillaRecipes().get(outputStack)) {
recipeMap.put(outputStack, inputStacks);
}
}
// Add recipes gathered via IMC
for (WrappedStack outputStack : RecipesIMC.getIMCRecipes().keySet()) {
for (List<WrappedStack> inputStacks : RecipesIMC.getIMCRecipes().get(outputStack)) {
recipeMap.put(outputStack, inputStacks);
if (!recipeMap.get(outputStack).contains(inputStacks)) {
recipeMap.put(outputStack, inputStacks);
}
}
}
// Add fluid container recipes
for (WrappedStack outputStack : RecipesFluidContainers.getFluidContainerRecipes().keySet()) {
for (List<WrappedStack> inputStacks : RecipesFluidContainers.getFluidContainerRecipes().get(outputStack)) {
recipeMap.put(outputStack, inputStacks);
if (!recipeMap.get(outputStack).contains(inputStacks)) {
recipeMap.put(outputStack, inputStacks);
}
}
}
// Add potion recipes
for (WrappedStack outputStack : RecipesPotions.getPotionRecipes().keySet()) {
for (List<WrappedStack> inputStacks : RecipesPotions.getPotionRecipes().get(outputStack)) {
if (!recipeMap.get(outputStack).contains(inputStacks)) {
recipeMap.put(outputStack, inputStacks);
}
}
}
// Add recipes gathered via IMC
for (WrappedStack outputStack : RecipesIMC.getIMCRecipes().keySet()) {
for (List<WrappedStack> inputStacks : RecipesIMC.getIMCRecipes().get(outputStack)) {
if (!recipeMap.get(outputStack).contains(inputStacks)) {
recipeMap.put(outputStack, inputStacks);
}
}
}

View file

@ -2,6 +2,7 @@ package com.pahimar.ee3.item.crafting;
import com.google.common.collect.HashMultimap;
import com.google.common.collect.Multimap;
import com.pahimar.ee3.core.helper.LogHelper;
import com.pahimar.ee3.core.helper.RecipeHelper;
import com.pahimar.ee3.item.WrappedStack;
import net.minecraft.item.ItemStack;
@ -34,10 +35,13 @@ public class RecipesVanilla
for (Object recipeObject : CraftingManager.getInstance().getRecipeList())
{
if (recipeObject instanceof IRecipe)
{
// TODO Handle different IRecipe types here
LogHelper.debug(recipeObject.getClass().getCanonicalName());
IRecipe recipe = (IRecipe) recipeObject;
ItemStack recipeOutput = recipe.getRecipeOutput();