本文整理汇总了Java中net.minecraftforge.fml.common.registry.GameRegistry.addShapedRecipe方法的典型用法代码示例。如果您正苦于以下问题:Java GameRegistry.addShapedRecipe方法的具体用法?Java GameRegistry.addShapedRecipe怎么用?Java GameRegistry.addShapedRecipe使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraftforge.fml.common.registry.GameRegistry
的用法示例。
在下文中一共展示了GameRegistry.addShapedRecipe方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: registerRecipe
import net.minecraftforge.fml.common.registry.GameRegistry; //导入方法依赖的package包/类
public static void registerRecipe() {
GameRegistry.addShapedRecipe(new ItemStack(blockXPBox),
"OGO",
"ICI",
"ERE",
'O', Blocks.OBSIDIAN,
'E', Items.ENDER_PEARL,
'I', Items.IRON_INGOT,
'R', Items.REDSTONE,
'C', Blocks.CHEST,
'G', Blocks.GLASS_PANE);
}
示例2: register
import net.minecraftforge.fml.common.registry.GameRegistry; //导入方法依赖的package包/类
public void register() {
GameRegistry.addShapedRecipe(new ItemStack(ItemRegistry.plasmacannon, 1), new Object[] {
"igi",
"dss",
"xii",
'i', new ItemStack(Items.IRON_INGOT),
'g', new ItemStack(Blocks.GLASS),
'd', new ItemStack(Blocks.DRAGON_EGG),
's', new ItemStack(Items.NETHER_STAR)
});
}
示例3: register
import net.minecraftforge.fml.common.registry.GameRegistry; //导入方法依赖的package包/类
public static void register(){
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.emptytincan), ModItems.tiningot, ModItems.tiningot);
GameRegistry.addSmelting(ModItems.emptytincan, new ItemStack(ModItems.tiningot), 0.5F);
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.tinfoil, 2), ModItems.tiningot);
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.toothbrushshiv), ModItems.toothbrush, Items.FLINT);
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.tiningot), ModItems.tinfoil, ModItems.tinfoil, ModItems.tinfoil, ModItems.tinfoil);
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.woodenchunk, 2), ModItems.brokenstick);
GameRegistry.addShapelessRecipe(new ItemStack(Blocks.PLANKS), ModItems.woodenchunk, ModItems.woodenchunk, ModItems.woodenchunk, ModItems.woodenchunk);
// Blocks
GameRegistry.addSmelting(ModBlocks.tinore, new ItemStack(ModItems.tiningot), 1.0F);
GameRegistry.addSmelting(ModBlocks.copperore, new ItemStack(ModItems.copperingot), 1.0F);
GameRegistry.addSmelting(ModBlocks.pyriteore, new ItemStack(ModItems.pyriteingot), 1.0F);
// Tin
GameRegistry.addShapedRecipe(new ItemStack(ModBlocks.tinblock), "TTT", "TTT", "TTT", 'T', ModItems.tiningot);
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.tiningot, 9), ModBlocks.tinblock);
// Copper
GameRegistry.addShapedRecipe(new ItemStack(ModBlocks.copperblock), "CCC", "CCC", "CCC", 'C', ModItems.copperingot);
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.copperingot, 9), ModBlocks.copperblock);
// Pyrite
GameRegistry.addShapedRecipe(new ItemStack(ModBlocks.pyriteblock), "PPP", "PPP", "PPP", 'P', ModItems.pyriteingot);
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.pyriteingot, 9), ModBlocks.pyriteblock);
GameRegistry.addShapedRecipe(new ItemStack(ModItems.tinfoilhelmet), "TTT", "TXT", "XXX", 'T', ModItems.tinfoil);
}
示例4: registerCrafting
import net.minecraftforge.fml.common.registry.GameRegistry; //导入方法依赖的package包/类
private void registerCrafting() {
GameRegistry.addRecipe(new ShapedOreRecipe(ModItems.pole, "#", "#", '#', Items.STICK));
GameRegistry.addShapedRecipe(ModItems.woodSpear,
"#",
"$",
"$",
'#', new ItemStack(Items.WOODEN_SWORD),
'$', ModItems.pole);
GameRegistry.addShapedRecipe(ModItems.stoneSpear,
"#",
"$",
"$",
'#', new ItemStack(Items.STONE_SWORD),
'$', ModItems.pole);
GameRegistry.addShapedRecipe(ModItems.ironSpear,
"#",
"$",
"$",
'#', new ItemStack(Items.IRON_SWORD),
'$', ModItems.pole);
GameRegistry.addShapedRecipe(ModItems.goldSpear,
"#",
"$",
"$",
'#', new ItemStack(Items.GOLDEN_SWORD),
'$', ModItems.pole);
GameRegistry.addShapedRecipe(ModItems.diamondSpear,
"#",
"$",
"$",
'#', new ItemStack(Items.DIAMOND_SWORD),
'$', ModItems.pole);
}
示例5: init
import net.minecraftforge.fml.common.registry.GameRegistry; //导入方法依赖的package包/类
public static void init() {
GameRegistry.addShapedRecipe(new ItemStack(ModBlocks.shipInterface), "ICI", "TOT", "ICI",
'I', Items.IRON_INGOT,
'C', ValkyrienWarfareWorld.INSTANCE.etheriumCrystal,
'T', li.cil.oc.api.Items.get("transistor").createItemStack(1),
'O', Blocks.field_190976_dk); //Observer block
}
示例6: registerShapedRecipes
import net.minecraftforge.fml.common.registry.GameRegistry; //导入方法依赖的package包/类
public static void registerShapedRecipes() {
GameRegistry.addShapedRecipe(new ItemStack(Blocks.CHEST, 4), "XXX", "X X", "XXX", 'X', Blocks.LOG);
GameRegistry.addShapedRecipe(new ItemStack(ModBlocks.blockBreaker, 1, 0), "APS", "RCR", "BBB", 'R',
Items.REDSTONE, 'C', new ItemStack(ModBlocks.blockMachineCase, 1, 0), 'B', Blocks.IRON_BLOCK, 'A',
Items.IRON_AXE, 'P', Items.IRON_PICKAXE, 'S', Items.IRON_SHOVEL);
GameRegistry.addShapedRecipe(new ItemStack(ModBlocks.blockBreaker, 1, 0), "PAS", "RCR", "BBB", 'R',
Items.REDSTONE, 'C', new ItemStack(ModBlocks.blockMachineCase, 1, 0), 'B', Blocks.IRON_BLOCK, 'A',
Items.IRON_AXE, 'P', Items.IRON_PICKAXE, 'S', Items.IRON_SHOVEL);
GameRegistry.addShapedRecipe(new ItemStack(ModBlocks.blockBreaker, 1, 0), "SPA", "RCR", "BBB", 'R',
Items.REDSTONE, 'C', new ItemStack(ModBlocks.blockMachineCase, 1, 0), 'B', Blocks.IRON_BLOCK, 'A',
Items.IRON_AXE, 'P', Items.IRON_PICKAXE, 'S', Items.IRON_SHOVEL);
GameRegistry.addShapedRecipe(new ItemStack(ModBlocks.blockBreaker, 1, 0), "ASP", "RCR", "BBB", 'R',
Items.REDSTONE, 'C', new ItemStack(ModBlocks.blockMachineCase, 1, 0), 'B', Blocks.IRON_BLOCK, 'A',
Items.IRON_AXE, 'P', Items.IRON_PICKAXE, 'S', Items.IRON_SHOVEL);
GameRegistry.addShapedRecipe(new ItemStack(ModBlocks.blockBreaker, 1, 1), "APS", "RCR", "BBB", 'R',
Items.REDSTONE, 'C', new ItemStack(ModBlocks.blockMachineCase, 1, 1), 'B', Blocks.IRON_BLOCK, 'A',
Items.IRON_AXE, 'P', Items.IRON_PICKAXE, 'S', Items.IRON_SHOVEL);
GameRegistry.addShapedRecipe(new ItemStack(ModBlocks.blockBreaker, 1, 1), "PAS", "RCR", "BBB", 'R',
Items.REDSTONE, 'C', new ItemStack(ModBlocks.blockMachineCase, 1, 1), 'B', Blocks.IRON_BLOCK, 'A',
Items.IRON_AXE, 'P', Items.IRON_PICKAXE, 'S', Items.IRON_SHOVEL);
GameRegistry.addShapedRecipe(new ItemStack(ModBlocks.blockBreaker, 1, 1), "SPA", "RCR", "BBB", 'R',
Items.REDSTONE, 'C', new ItemStack(ModBlocks.blockMachineCase, 1, 1), 'B', Blocks.IRON_BLOCK, 'A',
Items.IRON_AXE, 'P', Items.IRON_PICKAXE, 'S', Items.IRON_SHOVEL);
GameRegistry.addShapedRecipe(new ItemStack(ModBlocks.blockBreaker, 1, 1), "ASP", "RCR", "BBB", 'R',
Items.REDSTONE, 'C', new ItemStack(ModBlocks.blockMachineCase, 1, 1), 'B', Blocks.IRON_BLOCK, 'A',
Items.IRON_AXE, 'P', Items.IRON_PICKAXE, 'S', Items.IRON_SHOVEL);
GameRegistry.addShapedRecipe(new ItemStack(ModBlocks.blockJar), "SWS", "SWS", "SSS", 'S',
ModBlocks.blockSandbrick, 'W', Items.WATER_BUCKET);
GameRegistry.addShapedRecipe(new ItemStack(ModBlocks.blockMachineCase, 1, 0), "III", "BCB", "RPR", 'I',
Items.IRON_INGOT, 'B', Blocks.IRON_BLOCK, 'C', new ItemStack(ModItems.itemChip, 1, 0), 'R',
Items.REDSTONE, 'P', Blocks.PISTON);
GameRegistry.addShapedRecipe(new ItemStack(ModBlocks.blockMachineCase, 1, 1), "III", "BCB", "RPR", 'I',
Items.IRON_INGOT, 'B', Blocks.IRON_BLOCK, 'C', new ItemStack(ModItems.itemChip, 1, 1), 'R',
Items.REDSTONE, 'P', Blocks.PISTON);
GameRegistry.addShapedRecipe(new ItemStack(ModBlocks.blockSandbrick), "SSS", "SBS", "SSS", 'S', Blocks.SAND,
'B', ModBlocks.blockRawSandbrick);
GameRegistry.addShapedRecipe(new ItemStack(ModItems.itemChipRaw, 1, 0), "RLR", "GGG", "III", 'R',
Items.REDSTONE, 'L', Items.GOLD_INGOT, 'G', Items.GOLD_NUGGET, 'I', Items.IRON_INGOT);
GameRegistry.addShapedRecipe(new ItemStack(ModItems.itemChipRaw, 1, 1), "RLR", "GGG", "III", 'R',
Items.REDSTONE, 'L', Items.DIAMOND, 'G', Items.GOLD_NUGGET, 'I', Items.IRON_INGOT);
}
示例7: registerRecipe
import net.minecraftforge.fml.common.registry.GameRegistry; //导入方法依赖的package包/类
private void registerRecipe() {
// Shaped Recipes
GameRegistry.addShapedRecipe(new ItemStack(BlockLoader.slimeBlock),
new Object[] { "SSS", "SSS", "SSS", 'S', Items.SLIME_BALL });
GameRegistry.addShapedRecipe(new ItemStack(BlockLoader.magicMatterBlock),
new Object[] { "MMM", "MMM", "MMM", 'M', ItemLoader.magicMatter });
GameRegistry.addShapedRecipe(new ItemStack(ItemLoader.magicMatter),
new Object[] { "SIS", "SDS", "SIS", 'S', Items.DYE, 'I', Items.IRON_INGOT, 'D', Items.DIAMOND });
GameRegistry.addShapedRecipe(new ItemStack(ItemLoader.magicMatter),
new Object[] { "SSS", "IDI", "SSS", 'S', Items.DYE, 'I', Items.IRON_INGOT, 'D', Items.DIAMOND });
GameRegistry.addShapedRecipe(new ItemStack(Items.NAME_TAG, 3),
new Object[] { "S", "P", "P", 'S', Items.STRING, 'P', Items.PAPER });
GameRegistry.addShapedRecipe(new ItemStack(Items.SADDLE),
new Object[] { "LLL", "LLL", " I", 'L', Items.LEATHER, 'I', Items.IRON_INGOT });
GameRegistry.addRecipe(new ItemStack(Items.IRON_HORSE_ARMOR),
new Object[] { " I", " SI", "III", 'I', Items.IRON_INGOT, 'S', Items.SADDLE });
GameRegistry.addRecipe(new ItemStack(Items.GOLDEN_HORSE_ARMOR),
new Object[] { " G", " SG", "GGG", 'G', Items.GOLD_INGOT, 'S', Items.SADDLE });
GameRegistry.addRecipe(new ItemStack(Items.DIAMOND_HORSE_ARMOR),
new Object[] { " D", " SD", "DDD", 'D', Items.DIAMOND, 'S', Items.SADDLE });
GameRegistry.addShapedRecipe(new ItemStack(Items.NETHER_STAR), new Object[] { "ODO", "DMD", "ODO", 'O',
Blocks.OBSIDIAN, 'D', Items.DIAMOND, 'M', ItemLoader.magicMatter });
GameRegistry.addShapedRecipe(new ItemStack(Items.LEAD, 3),
new Object[] { "SSS", "SLS", "SSS", 'S', Items.STRING, 'L', Items.LEATHER });
GameRegistry.addShapedRecipe(new ItemStack(Items.FLINT, 32),
new Object[] { " C ", "CIC", " C ", 'C', Items.COAL, 'I', Items.IRON_INGOT });
GameRegistry.addShapedRecipe(new ItemStack(Items.SLIME_BALL, 4),
new Object[] { " S ", "SWS", " S ", 'S', Items.WHEAT_SEEDS, 'W', Items.WATER_BUCKET });
GameRegistry.addShapedRecipe(new ItemStack(Items.SLIME_BALL, 8),
new Object[] { "SSS", "SWS", "SSS", 'S', Items.WHEAT_SEEDS, 'W', Items.WATER_BUCKET });
GameRegistry.addShapedRecipe(new ItemStack(Items.FEATHER),
new Object[] { "S ", "S ", "S ", 'S', Items.STRING });
GameRegistry.addShapedRecipe(new ItemStack(Blocks.ICE),
new Object[] { " S ", "SWS", " S ", 'S', Items.SNOWBALL, 'W', Items.WATER_BUCKET });
// Shapeless Recipes
GameRegistry.addShapelessRecipe(new ItemStack(ItemLoader.magicMatter, 9), BlockLoader.magicMatterBlock);
GameRegistry.addShapelessRecipe(new ItemStack(Items.WHEAT_SEEDS), Items.WHEAT);
GameRegistry.addShapelessRecipe(new ItemStack(Items.BRICK, 4), Blocks.BRICK_BLOCK);
GameRegistry.addShapelessRecipe(new ItemStack(Items.GLOWSTONE_DUST, 4), Blocks.GLOWSTONE);
GameRegistry.addShapelessRecipe(new ItemStack(Items.STRING, 4), Blocks.WOOL);
}
示例8: registerRecipe
import net.minecraftforge.fml.common.registry.GameRegistry; //导入方法依赖的package包/类
public static void registerRecipe() {
GameRegistry.addShapedRecipe(new ItemStack(stone_ball, 8),
"A ",
" A",
'A', Item.getItemFromBlock(Blocks.COBBLESTONE));
GameRegistry.addShapedRecipe(new ItemStack(stone_ball, 8),
" A",
"A ",
'A', Item.getItemFromBlock(Blocks.COBBLESTONE));
GameRegistry.addShapedRecipe(new ItemStack(metal_ball, 16),
" A",
"B ",
'A', Items.IRON_INGOT,
'B', Items.GOLD_INGOT);
GameRegistry.addShapedRecipe(new ItemStack(metal_ball, 16),
" B",
"A ",
'A', Items.IRON_INGOT,
'B', Items.GOLD_INGOT);
GameRegistry.addShapedRecipe(new ItemStack(metal_ball, 16),
"A ",
" B",
'A', Items.IRON_INGOT,
'B', Items.GOLD_INGOT);
GameRegistry.addShapedRecipe(new ItemStack(metal_ball, 16),
"B ",
" A",
'A', Items.IRON_INGOT,
'B', Items.GOLD_INGOT);
GameRegistry.addShapedRecipe(new ItemStack(ender_ball, 16),
"B ",
" A",
'A', Items.DIAMOND,
'B', Items.ENDER_PEARL);
GameRegistry.addShapedRecipe(new ItemStack(ender_ball, 16),
"A ",
" B",
'A', Items.DIAMOND,
'B', Items.ENDER_PEARL);
GameRegistry.addShapedRecipe(new ItemStack(ender_ball, 16),
" A",
"B ",
'A', Items.DIAMOND,
'B', Items.ENDER_PEARL);
GameRegistry.addShapedRecipe(new ItemStack(ender_ball, 16),
" B",
"A ",
'A', Items.DIAMOND,
'B', Items.ENDER_PEARL);
GameRegistry.addShapedRecipe(new ItemStack(slingshot),
"sfs",
"t t",
" t ",
's', Items.STRING,
'f', Items.LEATHER,
't', Items.STICK);
GameRegistry.addRecipe(new RecipeLooting());
}
示例9: initCrafting
import net.minecraftforge.fml.common.registry.GameRegistry; //导入方法依赖的package包/类
public static void initCrafting() {
GameRegistry.addShapedRecipe(new ItemStack(manual), "ppp", "pbp", "ppp", 'b', Items.BOOK, 'p', Items.PAPER);
}