Added basic ee3 support for all machines, will not work right when it has two outputs

This commit is contained in:
modmuss50 2015-05-30 11:47:01 +01:00
parent 309321dbdc
commit 9075692951
4 changed files with 23 additions and 7 deletions

View file

@ -90,6 +90,8 @@ public class Core {
{ {
// Has to be done here as Buildcraft registers there recipes late // Has to be done here as Buildcraft registers there recipes late
RecipeManager.init(); RecipeManager.init();
//Has to be done after the recipes have been added
CompatManager.postInit(event);
//RecipeHanderer.addOreDicRecipes(); //RecipeHanderer.addOreDicRecipes();
LogHelper.info(RecipeHanderer.recipeList.size() + " recipes loaded"); LogHelper.info(RecipeHanderer.recipeList.size() + " recipes loaded");
} }

View file

@ -1,5 +1,6 @@
package techreborn.compat; package techreborn.compat;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import techreborn.compat.ee3.EmcValues; import techreborn.compat.ee3.EmcValues;
import techreborn.compat.waila.CompatModuleWaila; import techreborn.compat.waila.CompatModuleWaila;
import techreborn.init.ModParts; import techreborn.init.ModParts;
@ -21,9 +22,12 @@ public class CompatManager {
// Register Multiparts // Register Multiparts
ModParts.init(); ModParts.init();
} }
}
public static void postInit(FMLPostInitializationEvent event){
if(Loader.isModLoaded("EE3")) if(Loader.isModLoaded("EE3"))
{ {
// Register Emc Values // Register Emc Values and machine crafting handlers
EmcValues.init(); EmcValues.init();
} }
} }

View file

@ -1,10 +1,20 @@
package techreborn.compat.ee3; package techreborn.compat.ee3;
import com.pahimar.ee3.api.exchange.RecipeRegistryProxy;
import net.minecraft.item.ItemStack;
import techreborn.api.recipe.IBaseRecipeType;
import techreborn.api.recipe.RecipeHanderer;
public class EmcValues { public class EmcValues {
public static void init() public static void init()
{ {
//TODO for(IBaseRecipeType recipeType : RecipeHanderer.recipeList){
for(ItemStack output : recipeType.getOutputs()){
//TODO this does not handle multi outputs
RecipeRegistryProxy.addRecipe(output, recipeType.getInputs());
}
}
} }
} }

View file

@ -173,7 +173,7 @@ public class ModRecipes {
TechRebornAPI.addRollingMachinceRecipe(new ItemStack(Blocks.furnace, 4), "ccc", "c c", "ccc", 'c', Blocks.cobblestone); TechRebornAPI.addRollingMachinceRecipe(new ItemStack(Blocks.furnace, 4), "ccc", "c c", "ccc", 'c', Blocks.cobblestone);
TechRebornAPI.registerBlastFurnaceRecipe(new BlastFurnaceRecipe(new ItemStack(Items.apple), new ItemStack(Items.ender_pearl), new ItemStack(Items.golden_apple), new ItemStack(Items.diamond), 120, 1000)); TechRebornAPI.registerBlastFurnaceRecipe(new BlastFurnaceRecipe(new ItemStack(Items.apple), new ItemStack(Items.ender_pearl), new ItemStack(Items.golden_apple), new ItemStack(Items.diamond), 120, 1000));
RecipeHanderer.addRecipe(new ImplosionCompressorRecipe(new ItemStack(Blocks.end_stone, 4), null, new ItemStack(Items.brewing_stand), new ItemStack(Items.carrot), 120, 5)); RecipeHanderer.addRecipe(new ImplosionCompressorRecipe(new ItemStack(Blocks.netherrack, 4), new ItemStack(Blocks.diamond_block, 1), new ItemStack(ModItems.bucketTritium), null, 120, 5));
RecipeHanderer.addRecipe(new AlloySmelterRecipe(new ItemStack(Items.coal), new ItemStack(Blocks.sand), new ItemStack(Items.diamond), 120, 5)); RecipeHanderer.addRecipe(new AlloySmelterRecipe(new ItemStack(Items.coal), new ItemStack(Blocks.sand), new ItemStack(Items.diamond), 120, 5));
RecipeHanderer.addRecipe(new AssemblingMachineRecipe(new ItemStack(Items.coal), new ItemStack(Blocks.sand), new ItemStack(Items.diamond), 120, 5)); RecipeHanderer.addRecipe(new AssemblingMachineRecipe(new ItemStack(Items.coal), new ItemStack(Blocks.sand), new ItemStack(Items.diamond), 120, 5));