Java Code Examples for cpw.mods.fml.common.registry.GameRegistry#addShapelessRecipe()
The following examples show how to use
cpw.mods.fml.common.registry.GameRegistry#addShapelessRecipe() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ModRecipes.java From GardenCollection with MIT License | 6 votes |
public void init () { GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.compostBin), "xxx", "xxx", "yyy", 'x', "stickWood", 'y', "slabWood")); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.soilTestKit), "xy", "zz", 'x', "dyeRed", 'y', "dyeGreen", 'z', Items.glass_bottle)); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.soilTestKit), "yx", "zz", 'x', "dyeRed", 'y', "dyeGreen", 'z', Items.glass_bottle)); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gardenTrowel), " z", " y ", "x ", 'x', "stickWood", 'y', "ingotIron", 'z', ModItems.compostPile)); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gardenTrowel), " x", " y ", "z ", 'x', "stickWood", 'y', "ingotIron", 'z', ModItems.compostPile)); GameRegistry.addShapelessRecipe(new ItemStack(ModBlocks.gardenSoil), Blocks.dirt, ModItems.compostPile); }
Example 2
Source File: MainRegistry.java From NewHorizonsCoreMod with GNU General Public License v3.0 | 5 votes |
private void InitAdditionalBlocks() { GameRegistry.registerBlock(_mBlockBabyChest, ItemBlockBabyChest.class, "BabyChest"); GameRegistry.addShapelessRecipe(new ItemStack(_mBlockBabyChest, 9), new ItemStack(Blocks.chest, 1, 0)); GameRegistry.registerTileEntity(TileEntityBabyChest.class, "teBabyChest"); NetworkRegistry.INSTANCE.registerGuiHandler(this, new GuiHandler()); proxy.registerRenderInfo(); }
Example 3
Source File: ModRecipes.java From GardenCollection with MIT License | 5 votes |
public void init () { for (int i = 0; i < BlockThinLog.subNames.length; i++) { GameRegistry.addRecipe(new ItemStack(ModBlocks.thinLogFence, 3, i), "xyx", " y ", 'x', Items.string, 'y', new ItemStack(ModBlocks.thinLog, 1, i)); if (i / 4 == 0) { GameRegistry.addRecipe(new ItemStack(Blocks.log, 1, i % 4), "xx", "xx", 'x', new ItemStack(ModBlocks.thinLog, 1, i)); for (int j = 0; j < axeList.length; j++) GameRegistry.addRecipe(new ItemStack(ModBlocks.thinLog, 4, i), "x", "y", 'x', new ItemStack(axeList[j], 1, OreDictionary.WILDCARD_VALUE), 'y', new ItemStack(Blocks.log, 1, i % 4)); } else if (i / 4 == 1) { GameRegistry.addRecipe(new ItemStack(Blocks.log2, 1, i % 4), "xx", "xx", 'x', new ItemStack(ModBlocks.thinLog, 1, i)); for (int j = 0; j < axeList.length; j++) GameRegistry.addRecipe(new ItemStack(ModBlocks.thinLog, 4, i), "x", "y", 'x', new ItemStack(axeList[j], 1, OreDictionary.WILDCARD_VALUE), 'y', new ItemStack(Blocks.log2, 1, i % 4)); } } ItemStack enrichedSoil = new ItemStack(ModItems.compostPile); GameRegistry.addShapelessRecipe(new ItemStack(ModBlocks.sapling), new ItemStack(Blocks.sapling, 1, 1), enrichedSoil); GameRegistry.addShapelessRecipe(new ItemStack(ModBlocks.sapling, 1, 1), new ItemStack(Blocks.sapling), new ItemStack(Blocks.vine), enrichedSoil); GameRegistry.addShapelessRecipe(new ItemStack(ModBlocks.sapling, 1, 2), new ItemStack(Blocks.sapling, 1, 2), enrichedSoil); GameRegistry.addShapelessRecipe(new ItemStack(ModBlocks.ivy), new ItemStack(Blocks.vine), enrichedSoil); GameRegistry.addSmelting(com.jaquadro.minecraft.gardentrees.core.ModItems.candelilla, new ItemStack(ModItems.wax), 0); addExtraWoodRecipes(); }
Example 4
Source File: ArchimedesShipMod.java From archimedes-ships with MIT License | 5 votes |
private void registerBlocksAndItems() { GameRegistry.addRecipe(new ItemStack(blockMarkShip, 1), "X#X", "#O#", "X#X", Character.valueOf('X'), Blocks.planks, Character.valueOf('#'), Items.stick, Character.valueOf('O'), Items.iron_ingot); GameRegistry.registerTileEntity(TileEntityHelm.class, "archiHelm"); Blocks.fire.setFireInfo(blockMarkShip, 5, 5); GameRegistry.addShapelessRecipe(new ItemStack(blockFloater, 1), Blocks.log, Blocks.wool); GameRegistry.addShapelessRecipe(new ItemStack(blockFloater, 1), Blocks.log2, Blocks.wool); //GameRegistry.addRecipe(new ItemStack(blockBalloon, 1), "X", "#", Character.valueOf('X'), Block.cloth, Character.valueOf('#'), Item.silk); for (int i = 0; i < ItemDye.field_150923_a.length; i++) { GameRegistry.addRecipe(new ItemStack(blockBalloon, 1, i), "X", "#", Character.valueOf('X'), new ItemStack(Blocks.wool, 1, i), Character.valueOf('#'), Items.string); } Blocks.fire.setFireInfo(blockBalloon, 30, 60); GameRegistry.addRecipe(new ItemStack(blockGauge, 1, 0), "VXV", "XO#", " # ", Character.valueOf('X'), Items.iron_ingot, Character.valueOf('#'), Items.gold_ingot, Character.valueOf('O'), Items.redstone, Character.valueOf('V'), Blocks.glass_pane); GameRegistry.addRecipe(new ItemStack(blockGauge, 1, 0), "VXV", "XO#", " # ", Character.valueOf('X'), Items.gold_ingot, Character.valueOf('#'), Items.iron_ingot, Character.valueOf('O'), Items.redstone, Character.valueOf('V'), Blocks.glass_pane); GameRegistry.addRecipe(new ItemStack(blockGauge, 1, 1), "VXV", "XO#", "V#V", Character.valueOf('X'), Items.iron_ingot, Character.valueOf('#'), Items.gold_ingot, Character.valueOf('O'), Items.redstone, Character.valueOf('V'), Blocks.glass_pane); GameRegistry.addRecipe(new ItemStack(blockGauge, 1, 1), "VXV", "XO#", "V#V", Character.valueOf('X'), Items.gold_ingot, Character.valueOf('#'), Items.iron_ingot, Character.valueOf('O'), Items.redstone, Character.valueOf('V'), Blocks.glass_pane); GameRegistry.registerTileEntity(TileEntityGauge.class, "archiGauge"); GameRegistry.addRecipe(new ItemStack(blockSeat), "X ", "XX", Character.valueOf('X'), Blocks.wool); Blocks.fire.setFireInfo(blockSeat, 30, 30); GameRegistry.addShapelessRecipe(new ItemStack(blockBuffer), blockFloater, new ItemStack(Items.dye, 1, 0)); GameRegistry.addRecipe(new ItemStack(blockCrateWood, 3), " # ", "# #", "XXX", Character.valueOf('#'), Items.leather, Character.valueOf('X'), Blocks.planks); GameRegistry.registerTileEntity(TileEntityCrate.class, "archiCrate"); GameRegistry.addRecipe(new ItemStack(blockEngine, 1), "#O#", "#X#", "###", Character.valueOf('#'), Items.iron_ingot, Character.valueOf('O'), Items.water_bucket, Character.valueOf('X'), Blocks.furnace); GameRegistry.registerTileEntity(TileEntityEngine.class, "archiEngine"); }
Example 5
Source File: BaseRecipeRegistry.java From Electro-Magic-Tools with GNU General Public License v3.0 | 5 votes |
public static void addCarverRecipe(ItemStack output, ItemStack input) { GameRegistry.addShapelessRecipe(output, BaseItemStacks.woodenCarver, input); GameRegistry.addShapelessRecipe(output, BaseItemStacks.stoneCarver, input); GameRegistry.addShapelessRecipe(output, BaseItemStacks.ironCarver, input); GameRegistry.addShapelessRecipe(output, BaseItemStacks.obsidianCarver, input); GameRegistry.addShapelessRecipe(output, BaseItemStacks.diamondCarver, input); }
Example 6
Source File: BaseRecipeRegistry.java From Electro-Magic-Tools with GNU General Public License v3.0 | 5 votes |
public static void addCarverRecipe(ItemStack output, String input) { if (isOreRegistered(input)) { for (int i = 0; i < OreDictionary.getOres(input).size(); i++) { GameRegistry.addShapelessRecipe(output, BaseItemStacks.woodenCarver, OreDictionary.getOres(input).get(i)); GameRegistry.addShapelessRecipe(output, BaseItemStacks.stoneCarver, OreDictionary.getOres(input).get(i)); GameRegistry.addShapelessRecipe(output, BaseItemStacks.ironCarver, OreDictionary.getOres(input).get(i)); GameRegistry.addShapelessRecipe(output, BaseItemStacks.obsidianCarver, OreDictionary.getOres(input).get(i)); GameRegistry.addShapelessRecipe(output, BaseItemStacks.diamondCarver, OreDictionary.getOres(input).get(i)); } } }
Example 7
Source File: BlockBRMetal.java From BigReactors with MIT License | 5 votes |
public void registerIngotRecipes(ItemIngot ingotItem) { for(int i = 0; i < NUM_BLOCKS; i++) { ItemStack block = new ItemStack(this, 1, i); ItemStack ingot = ingotItem.getIngotItem(_materials[i]); GameRegistry.addShapelessRecipe(block, ingot, ingot, ingot, ingot, ingot, ingot, ingot, ingot, ingot); ingot.stackSize = 9; GameRegistry.addShapelessRecipe(ingot, block); } }
Example 8
Source File: Recipes.java From Ex-Aliquo with MIT License | 4 votes |
protected static void CraftNatura() { GameRegistry.addShapelessRecipe(new ItemStack(getBlock(Info.nethersoil), 1, 0), Block.dirt, getItem(Info.witchbucket)); GameRegistry.addShapelessRecipe(new ItemStack(getBlock(Info.nethersand), 1, 0), Block.sand, getBlock(Info.thornvines), Item.blazePowder); }
Example 9
Source File: TranslocatorProxy.java From Translocators with MIT License | 4 votes |
public void init() { blockTranslocator = new BlockTranslocator(); blockTranslocator.setBlockName("translocator").setCreativeTab(CreativeTabs.tabRedstone); blockCraftingGrid = new BlockCraftingGrid(); blockCraftingGrid.setBlockName("craftingGrid"); blockCraftingGrid.setBlockTextureName("planks_oak"); itemDiamondNugget = new Item() .setUnlocalizedName("translocator:diamondNugget").setTextureName("translocator:diamondNugget") .setCreativeTab(CreativeTabs.tabMaterials); GameRegistry.registerItem(itemDiamondNugget, "diamondNugget"); OreDictionary.registerOre("nuggetDiamond", itemDiamondNugget); GameRegistry.registerBlock(blockTranslocator, ItemTranslocator.class, "translocator"); GameRegistry.registerBlock(blockCraftingGrid, "craftingGrid"); MinecraftForge.EVENT_BUS.register(blockTranslocator); MinecraftForge.EVENT_BUS.register(blockCraftingGrid); GameRegistry.registerTileEntity(TileItemTranslocator.class, "itemTranslocator"); GameRegistry.registerTileEntity(TileLiquidTranslocator.class, "liquidTranslocator"); GameRegistry.registerTileEntity(TileCraftingGrid.class, "craftingGrid"); PacketCustom.assignHandler(TranslocatorSPH.channel, new TranslocatorSPH()); GameRegistry.addRecipe(new ItemStack(blockTranslocator, 2, 0), "rer", "ipi", "rgr", 'r', Items.redstone, 'e', Items.ender_pearl, 'i', Items.iron_ingot, 'g', Items.gold_ingot, 'p', Blocks.piston); GameRegistry.addRecipe(new ItemStack(blockTranslocator, 2, 1), "rer", "ipi", "rlr", 'r', Items.redstone, 'e', Items.ender_pearl, 'i', Items.iron_ingot, 'l', new ItemStack(Items.dye, 1, 4), 'p', Blocks.piston); API.hideItem(new ItemStack(blockCraftingGrid)); GameRegistry.addShapelessRecipe(new ItemStack(Items.diamond), itemDiamondNugget, itemDiamondNugget, itemDiamondNugget, itemDiamondNugget, itemDiamondNugget, itemDiamondNugget, itemDiamondNugget, itemDiamondNugget, itemDiamondNugget); GameRegistry.addShapelessRecipe(new ItemStack(itemDiamondNugget, 9), Items.diamond); }