package com.yolp900.itsjustacharm.common.crafting; import com.yolp900.itsjustacharm.api.ItsJustaCharmAPI; import com.yolp900.itsjustacharm.api.constructionTable.RecipeShapedConstructionTable; import com.yolp900.itsjustacharm.api.constructionTable.RecipeShapelessConstructionTable; import com.yolp900.itsjustacharm.common.blocks.ModBlocks; import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; import net.minecraftforge.fml.common.registry.GameRegistry; import net.minecraftforge.oredict.RecipeSorter; import static com.yolp900.itsjustacharm.reference.LibOreDict.*; public class ModRecipes { public static void registerRecipes() { Crafting.registerCraftingRecipes(); ConstructionTable.registerConstructionTableRecipes(); } public static class Crafting { public static void registerCraftingRecipes() { GameRegistry.addShapelessRecipe(new ItemStack(ModBlocks.TintedPlanks, 4), ModBlocks.TintedLog); GameRegistry.addRecipe(new RingAttachmentRecipe()); RecipeSorter.register("ijc:ringAttach", RingAttachmentRecipe.class, RecipeSorter.Category.SHAPELESS, ""); GameRegistry.addRecipe(new RingRemovalRecipe()); RecipeSorter.register("ijc:ringRemove", RingRemovalRecipe.class, RecipeSorter.Category.SHAPELESS, ""); } } public static class ConstructionTable { static RecipeShapedConstructionTable LevitatorDiamond; static RecipeShapedConstructionTable LevitatorEnderPearl; static RecipeShapelessConstructionTable[] LatinBlocks = new RecipeShapelessConstructionTable[16]; public static void registerConstructionTableRecipes() { LevitatorDiamond = registerShapedRecipe(new ItemStack(ModBlocks.Levitator), obj(BRICK_STONE, Blocks.STONE_PRESSURE_PLATE, BRICK_STONE, DUST_REDSTONE, INGOT_IRON, DUST_REDSTONE, BRICK_STONE, DIAMOND, BRICK_STONE), obj(FEATHER, FEATHER, DUST_REDSTONE)); LevitatorEnderPearl = registerShapedRecipe(new ItemStack(ModBlocks.Levitator), obj(BRICK_STONE, Blocks.STONE_PRESSURE_PLATE, BRICK_STONE, DUST_REDSTONE, INGOT_IRON, DUST_REDSTONE, BRICK_STONE, ENDERPEARL, BRICK_STONE), obj(FEATHER, FEATHER, DUST_REDSTONE)); for (int i = 0; i < 16; i++) { LatinBlocks[i] = registerShapelessRecipe(new ItemStack(ModBlocks.LatinBlock, 8, i), obj(STONE, STONE, STONE, STONE), obj(DYES(i), DYES(i))); } } private static RecipeShapedConstructionTable registerShapedRecipe(ItemStack output, Object[] grid, Object[] sec) { return ItsJustaCharmAPI.ConstructionTable.registerShapedConstructionTableRecipe(output, grid, sec); } private static RecipeShapelessConstructionTable registerShapelessRecipe(ItemStack output, Object[] grid, Object[] sec) { return ItsJustaCharmAPI.ConstructionTable.registerShapelessConstructionTableRecipe(output, grid, sec); } private static Object[] obj(Object... inputs) { return inputs; } } }