當前位置: 首頁>>代碼示例>>Java>>正文


Java GameRegistry.addShapedRecipe方法代碼示例

本文整理匯總了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);
}
 
開發者ID:arucil,項目名稱:mc-XPBox,代碼行數:13,代碼來源:BlockXPBox.java

示例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)
		});
}
 
開發者ID:Herobone,項目名稱:HeroUtils,代碼行數:12,代碼來源:CraftingRegistry.java

示例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);
}
 
開發者ID:DeflatedPickles-Old-Repositories,項目名稱:JustJunk,代碼行數:33,代碼來源:ModCrafting.java

示例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);
}
 
開發者ID:TheTrueForce,項目名稱:Polearms,代碼行數:34,代碼來源:CommonProxy.java

示例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
}
 
開發者ID:djeezuss,項目名稱:Valkyrien-Warfare-Drivers-for-OpenComputers,代碼行數:8,代碼來源:ModRecipes.java

示例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);
}
 
開發者ID:IvanSteklow,項目名稱:VanillaExtras,代碼行數:42,代碼來源:CraftTweaker.java

示例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);
}
 
開發者ID:YoungGT,項目名稱:EasyCraft,代碼行數:42,代碼來源:CraftingLoader.java

示例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());
 }
 
開發者ID:arucil,項目名稱:mc-Slingshot,代碼行數:62,代碼來源:ModItems.java

示例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);
}
 
開發者ID:McJty,項目名稱:Lector,代碼行數:4,代碼來源:ModItems.java


注:本文中的net.minecraftforge.fml.common.registry.GameRegistry.addShapedRecipe方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。