2015-05-07 19:45:06 +02:00
|
|
|
package com.pahimar.ee3.api.recipe;
|
2015-02-25 06:03:59 +01:00
|
|
|
|
|
|
|
import com.pahimar.ee3.EquivalentExchange3;
|
|
|
|
import cpw.mods.fml.common.Mod;
|
|
|
|
import net.minecraft.item.ItemStack;
|
|
|
|
|
2023-01-03 17:47:36 +01:00
|
|
|
// TODO Clean this up and make it more nice for modders. Consider this very volatile for
|
|
|
|
// the time being
|
|
|
|
public class AludelRecipeProxy {
|
2015-02-25 06:03:59 +01:00
|
|
|
@Mod.Instance("EE3")
|
|
|
|
private static Object ee3Mod;
|
|
|
|
|
2023-01-03 17:47:36 +01:00
|
|
|
public void addRecipe(
|
|
|
|
ItemStack recipeOutput, ItemStack recipeInputStack, ItemStack recipeInputDust
|
|
|
|
) {
|
2015-02-25 06:03:59 +01:00
|
|
|
init();
|
|
|
|
|
2023-01-03 17:47:36 +01:00
|
|
|
if (ee3Mod != null) {
|
|
|
|
EE3Wrapper.ee3mod.getAludelRecipeManager().addRecipe(
|
|
|
|
recipeOutput, recipeInputStack, recipeInputDust
|
|
|
|
);
|
2015-02-25 06:03:59 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-01-03 17:47:36 +01:00
|
|
|
public ItemStack getResult(ItemStack recipeInputStack, ItemStack recipeInputDust) {
|
2015-02-25 06:03:59 +01:00
|
|
|
init();
|
|
|
|
|
2023-01-03 17:47:36 +01:00
|
|
|
if (ee3Mod != null) {
|
|
|
|
return EE3Wrapper.ee3mod.getAludelRecipeManager().getResult(
|
|
|
|
recipeInputStack, recipeInputDust
|
|
|
|
);
|
2015-02-25 06:03:59 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
2023-01-03 17:47:36 +01:00
|
|
|
private static class EE3Wrapper { private static EquivalentExchange3 ee3mod; }
|
2015-02-25 06:03:59 +01:00
|
|
|
|
2023-01-03 17:47:36 +01:00
|
|
|
private static void init() {
|
|
|
|
if (ee3Mod != null) {
|
2015-02-25 06:03:59 +01:00
|
|
|
EE3Wrapper.ee3mod = (EquivalentExchange3) ee3Mod;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|