You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
699 B
Java
23 lines
699 B
Java
package com.zivilon.cinder_loe.recipe;
|
|
|
|
import net.minecraft.item.ItemStack;
|
|
|
|
import java.lang.reflect.Method;
|
|
|
|
public class CinderBrewingRecipes {
|
|
public static void addCustomBrewingRecipe(ItemStack result, Object... ingredients) {
|
|
try {
|
|
Class<?> brewingRecipesClass = Class.forName("lotr.common.recipe.LOTRBrewingRecipes");
|
|
Method addBrewingRecipeMethod = brewingRecipesClass.getDeclaredMethod("addBrewingRecipe", ItemStack.class, Object[].class);
|
|
|
|
addBrewingRecipeMethod.setAccessible(true);
|
|
|
|
addBrewingRecipeMethod.invoke(null, result, ingredients);
|
|
|
|
|
|
} catch (Exception e) {
|
|
e.printStackTrace();
|
|
}
|
|
}
|
|
}
|