2016-05-19 21:17:56 +02:00
|
|
|
package com.pahimar.ee3.api.recipe;
|
|
|
|
|
2016-05-27 22:03:14 +02:00
|
|
|
import java.util.Arrays;
|
2016-05-19 21:17:56 +02:00
|
|
|
import java.util.List;
|
|
|
|
|
2023-01-03 17:47:36 +01:00
|
|
|
import com.pahimar.ee3.EquivalentExchange3;
|
|
|
|
import cpw.mods.fml.common.Mod;
|
2016-05-19 21:17:56 +02:00
|
|
|
|
2023-01-03 17:47:36 +01:00
|
|
|
public final class RecipeRegistryProxy {
|
|
|
|
public static void addRecipe(
|
|
|
|
Object recipeOutput, Object... recipeInputs
|
|
|
|
) { // TODO 1.9, List -> Collection
|
2016-05-27 22:03:14 +02:00
|
|
|
addRecipe(recipeOutput, Arrays.asList(recipeInputs));
|
|
|
|
}
|
|
|
|
|
2023-01-03 17:47:36 +01:00
|
|
|
public static void addRecipe(
|
|
|
|
Object recipeOutput, List<?> recipeInputList
|
|
|
|
) { // TODO 1.9, List -> Collection
|
2016-05-19 21:17:56 +02:00
|
|
|
|
|
|
|
init();
|
|
|
|
|
|
|
|
// NOOP if EquivalentExchange3 is not present
|
|
|
|
if (ee3Mod != null) {
|
2023-01-03 17:47:36 +01:00
|
|
|
EE3Wrapper.ee3mod.getRecipeRegistry().addRecipe(
|
|
|
|
recipeOutput, recipeInputList
|
|
|
|
);
|
2016-05-19 21:17:56 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public static void dumpRecipeRegistryToLog() {
|
|
|
|
init();
|
|
|
|
|
|
|
|
// NOOP if EquivalentExchange3 is not present
|
|
|
|
if (ee3Mod != null) {
|
|
|
|
EE3Wrapper.ee3mod.getRecipeRegistry().dumpRecipeRegistryToLog();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@Mod.Instance("EE3")
|
|
|
|
private static Object ee3Mod;
|
|
|
|
|
2023-01-03 17:47:36 +01:00
|
|
|
private static class EE3Wrapper { private static EquivalentExchange3 ee3mod; }
|
2016-05-19 21:17:56 +02:00
|
|
|
|
|
|
|
private static void init() {
|
|
|
|
if (ee3Mod != null) {
|
|
|
|
EE3Wrapper.ee3mod = (EquivalentExchange3) ee3Mod;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|