mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-22 21:19:49 +00:00
37 lines
1.1 KiB
Java
37 lines
1.1 KiB
Java
package crazypants.util;
|
|
|
|
import net.minecraft.block.Block;
|
|
import net.minecraft.item.Item;
|
|
import net.minecraft.item.ItemStack;
|
|
import net.minecraftforge.oredict.ShapedOreRecipe;
|
|
import net.minecraftforge.oredict.ShapelessOreRecipe;
|
|
|
|
import cpw.mods.fml.common.registry.GameRegistry;
|
|
|
|
public class RecipeUtil {
|
|
|
|
public static void addShaped(Item res, Object... recipe) {
|
|
addShaped(new ItemStack(res), recipe);
|
|
}
|
|
|
|
public static void addShaped(Block res, Object... recipe) {
|
|
addShaped(new ItemStack(res), recipe);
|
|
}
|
|
|
|
public static void addShaped(ItemStack res, Object... recipe) {
|
|
GameRegistry.addRecipe(new ShapedOreRecipe(res, recipe));
|
|
}
|
|
|
|
public static void addShapeless(Item res, Object... recipe) {
|
|
addShapeless(new ItemStack(res), recipe);
|
|
}
|
|
|
|
public static void addShapeless(Block res, Object... recipe) {
|
|
addShapeless(new ItemStack(res), recipe);
|
|
}
|
|
|
|
public static void addShapeless(ItemStack res, Object... recipe) {
|
|
GameRegistry.addRecipe(new ShapelessOreRecipe(res, recipe));
|
|
}
|
|
}
|