本文整理汇总了Java中net.minecraftforge.fml.common.registry.GameRegistry.addShapelessRecipe方法的典型用法代码示例。如果您正苦于以下问题:Java GameRegistry.addShapelessRecipe方法的具体用法?Java GameRegistry.addShapelessRecipe怎么用?Java GameRegistry.addShapelessRecipe使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraftforge.fml.common.registry.GameRegistry
的用法示例。
在下文中一共展示了GameRegistry.addShapelessRecipe方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: registerSpecialRecipes
import net.minecraftforge.fml.common.registry.GameRegistry; //导入方法依赖的package包/类
@SubscribeEvent
public void registerSpecialRecipes(RegistryEvent.Register<IRecipe> event) {
if (ConfigurationHandler.retrieveSaplingsMode == 2) {
ResourceLocation group = new ResourceLocation(GotWood.ID);
GameRegistry.addShapelessRecipe(new ResourceLocation("oak_seed"), group, new ItemStack(Blocks.SAPLING, 1, 0), Ingredient.fromStacks(new ItemStack(ItemRegistry.oak_seed)));
GameRegistry.addShapelessRecipe(new ResourceLocation("spruce_seed"), group, new ItemStack(Blocks.SAPLING, 1, 1), Ingredient.fromStacks(new ItemStack(ItemRegistry.spruce_seed)));
GameRegistry.addShapelessRecipe(new ResourceLocation("birch_seed"), group, new ItemStack(Blocks.SAPLING, 1, 2), Ingredient.fromStacks(new ItemStack(ItemRegistry.birch_seed)));
GameRegistry.addShapelessRecipe(new ResourceLocation("jungle_seed"), group, new ItemStack(Blocks.SAPLING, 1, 3), Ingredient.fromStacks(new ItemStack(ItemRegistry.jungle_seed)));
GameRegistry.addShapelessRecipe(new ResourceLocation("acacia_seed"), group, new ItemStack(Blocks.SAPLING, 1, 4), Ingredient.fromStacks(new ItemStack(ItemRegistry.acacia_seed)));
GameRegistry.addShapelessRecipe(new ResourceLocation("dark_oak_seed"), group, new ItemStack(Blocks.SAPLING, 1, 5), Ingredient.fromStacks(new ItemStack(ItemRegistry.dark_oak_seed)));
GameRegistry.addShapelessRecipe(new ResourceLocation("apple_seed"), group, new ItemStack(BlockRegistry.apple_sapling), Ingredient.fromStacks(new ItemStack(ItemRegistry.apple_seed)));
GameRegistry.addShapelessRecipe(new ResourceLocation("maple_seed"), group, new ItemStack(BlockRegistry.maple_sapling), Ingredient.fromStacks(new ItemStack(ItemRegistry.maple_seed)));
GameRegistry.addShapelessRecipe(new ResourceLocation("pine_seed"), group, new ItemStack(BlockRegistry.pine_sapling), Ingredient.fromStacks(new ItemStack(ItemRegistry.pine_seed)));
GameRegistry.addShapelessRecipe(new ResourceLocation("willow_seed"), group, new ItemStack(BlockRegistry.willow_sapling), Ingredient.fromStacks(new ItemStack(ItemRegistry.willow_seed)));
GameRegistry.addShapelessRecipe(new ResourceLocation("yew_seed"), group, new ItemStack(BlockRegistry.yew_sapling), Ingredient.fromStacks(new ItemStack(ItemRegistry.yew_seed)));
GameRegistry.addShapelessRecipe(new ResourceLocation("ebony_seed"), group, new ItemStack(BlockRegistry.ebony_sapling), Ingredient.fromStacks(new ItemStack(ItemRegistry.ebony_seed)));
GameRegistry.addShapelessRecipe(new ResourceLocation("fir_seed"), group, new ItemStack(BlockRegistry.fir_sapling), Ingredient.fromStacks(new ItemStack(ItemRegistry.fir_seed)));
}
}
示例2: onRegisterRecipe
import net.minecraftforge.fml.common.registry.GameRegistry; //导入方法依赖的package包/类
@SubscribeEvent
public void onRegisterRecipe(RegistryEvent.Register<IRecipe> event) {
FruitEnumLoader loader = FoodCraftReloaded.getProxy().getLoaderManager().getLoader(FruitEnumLoader.class).get();
OreDictionary.registerOre("cakeOriginal", Items.CAKE);
for (FruitType fruitType : FruitType.values()) {
event.getRegistry().register(new ShapedOreRecipe(new ResourceLocation("food"), new ItemStack(loader.getInstanceMap(BlockFruitSapling.class).get(fruitType)), " F ", "FXF", " F ", 'F', "crop" + StringUtils.capitalize(fruitType.toString()), 'X', "treeSapling").setRegistryName("fruit_sapling"));
event.getRegistry().register(new ShapelessOreRecipe(new ResourceLocation("food"), new ItemStack(loader.getInstanceMap(ItemFruitIcecream.class).get(fruitType)), "food" + StringUtils.capitalize(fruitType.toString()) + "juice", "foodIcecream").setRegistryName("fruit_icecream"));
GameRegistry.addShapelessRecipe(
new ResourceLocation(FoodCraftReloaded.MODID, NameBuilder.buildRegistryName("cake", "fruit", fruitType.toString())),
new ResourceLocation(FoodCraftReloaded.MODID, "cake"),
new ItemStack(loader.getInstanceMap(ItemFruitCake.class).get(fruitType)),
OreIngredient.fromItem(loader.getInstanceMap(ItemFruitJuice.class).get(fruitType)),
new OreIngredient("cakeOriginal")
);
}
event.getRegistry().register(new KitchenKnifeRecipe().setRegistryName(FoodCraftReloaded.MODID, "kitchen_knife_recipe"));
event.getRegistry().register(new CakeRecipe().setRegistryName(FoodCraftReloaded.MODID, "cake"));
RecipeSorter.register("foodcraftreloaded:cake", CakeRecipe.class, RecipeSorter.Category.SHAPELESS, "after:minecraft:shapeless");
}
示例3: registerItemRecipes
import net.minecraftforge.fml.common.registry.GameRegistry; //导入方法依赖的package包/类
private void registerItemRecipes()
{
this.registerLeaderRecipes(new ItemStack(this.claimOrder), Items.PAPER, Items.ARROW);
this.registerLeaderRecipes(new ItemStack(this.paymentOrder), Items.PAPER, Items.BOWL);
this.registerLeaderRecipes(new ItemStack(this.renameOrder), Items.PAPER, Items.BLAZE_POWDER);
this.registerLeaderRecipes(new ItemStack(this.inheritanceDeed), Items.PAPER, Items.GOLD_INGOT);
this.registerLeaderRecipes(new ItemStack(this.factionLedger), Items.PAPER, Items.BOOK);
this.registerLeaderRecipes(new ItemStack(this.returnOrder), Items.PAPER, Items.MAP);
GameRegistry.addShapelessRecipe(new ItemStack(this.playerIDCard), new ItemStack(Items.PAPER), new ItemStack(Items.PAPER), new ItemStack(Items.WOODEN_SWORD));
GameRegistry.addRecipe(new ItemStack(this.territoryMap), " o ", "oco", " o ",
'o', new ItemStack(this.claimOrder),
'c', Items.COMPASS
);
}
示例4: registerRecipe
import net.minecraftforge.fml.common.registry.GameRegistry; //导入方法依赖的package包/类
private static void registerRecipe()
{
GameRegistry.addRecipe(new ItemStack(ItemLoader.itemCamera), new Object[]{
"[email protected]#", "$%@", "@@@", '@', Blocks.OBSIDIAN, '!', Blocks.GLOWSTONE , '#',Blocks.STONE_BUTTON,'$',Items.ENDER_EYE,'%',Blocks.REDSTONE_BLOCK
});
GameRegistry.addShapelessRecipe(new ItemStack(ItemLoader.itemCamera),ItemLoader.itemTripod);
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(BlockLoader.pictureFrame), new Object[]{
"!!", "@@", '!', "plankWood", '@', Blocks.WOOL
}));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(BlockLoader.pictureFrameMultiple), new Object[]{
"!!!", "@@@","@@@", '!', "plankWood", '@', Blocks.WOOL
}));
GameRegistry.addRecipe(new ItemStack(ItemLoader.itemBattery), new Object[]{
"!#!", "[email protected]!","[email protected]!", '!', Blocks.REDSTONE_BLOCK, '@', Blocks.OBSIDIAN,'#',Blocks.STONE_BUTTON
});
GameRegistry.addRecipe(new ItemStack(ItemLoader.itemFilm), new Object[]{
"!!!", "@@@","!!!", '!', Items.ENDER_PEARL, '@', Blocks.GLASS_PANE
});
GameRegistry.addRecipe(new ItemStack(BlockLoader.photoprocessor), new Object[]{
"[email protected]!", "!#!","!$!", '!', Blocks.IRON_BLOCK, '@', Items.DIAMOND,'#',Items.ENDER_PEARL,'$',Blocks.REDSTONE_BLOCK
});
GameRegistry.addShapelessRecipe(new ItemStack(ItemLoader.itemPhotoPaper), Items.MILK_BUCKET,Items.PAPER,Items.IRON_INGOT,Items.GOLD_INGOT);
GameRegistry.addRecipe(new ItemStack(ItemLoader.itemCntsTempLiquid), new Object[]{
"!!!", "@[email protected]","@#@", '!', Items.BLAZE_ROD, '@', Blocks.GLASS_PANE,'#',Items.WATER_BUCKET
});
GameRegistry.addRecipe(new ItemStack(ItemLoader.itemDevelopingAgent), new Object[]{
"[email protected]#", "$%$","^&^", '!', new ItemStack(Items.DYE, 1, EnumDyeColor.RED.getDyeDamage()), '@', new ItemStack(Items.DYE, 1, EnumDyeColor.YELLOW.getDyeDamage()),'#', new ItemStack(Items.DYE, 1, EnumDyeColor.BLUE.getDyeDamage()),'$',Items.GOLD_INGOT,'%',Items.ENDER_PEARL,'^',Blocks.GLASS_PANE,'&',Items.WATER_BUCKET
});
GameRegistry.addRecipe(new ItemStack(ItemLoader.itemTripod), new Object[]{
" ! ", " @ ","@#@", '!', ItemLoader.itemCamera, '@', Blocks.IRON_BLOCK,'#',Items.ENDER_EYE
});
GameRegistry.addRecipe(new ItemStack(ItemLoader.itemGlassesHelmet), new Object[]{
"!$!", "@#@","! !", '!', Items.STICK, '@', Blocks.GLASS_PANE,'#',Blocks.OBSIDIAN,'$',Items.ENDER_EYE
});
GameRegistry.addRecipe(new ItemStack(ItemLoader.itemPictureBook), new Object[]{
"!!!", "[email protected]#","!##", '!', Items.PAPER, '@', Items.SLIME_BALL,'#',Items.LEATHER
});
}
示例5: 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);
}
示例6: registerShapelessRecipes
import net.minecraftforge.fml.common.registry.GameRegistry; //导入方法依赖的package包/类
public static void registerShapelessRecipes() {
GameRegistry.addShapelessRecipe(new ItemStack(Blocks.OBSIDIAN), Items.WATER_BUCKET, Items.WATER_BUCKET,
Items.LAVA_BUCKET);
GameRegistry.addShapelessRecipe(new ItemStack(Items.QUARTZ, 4), Blocks.QUARTZ_BLOCK);
GameRegistry.addShapelessRecipe(new ItemStack(ModBlocks.blockBreaker, 1, 2),
new ItemStack(ModBlocks.blockBreaker, 1, 1), new ItemStack(ModBlocks.blockMachineCase, 1, 2));
}
示例7: initRecipes
import net.minecraftforge.fml.common.registry.GameRegistry; //导入方法依赖的package包/类
public static void initRecipes() {
if (!UniqueCrops.baublesLoaded) return;
GameRegistry.addRecipe(new ItemStack(emblemMelee), " d ", "gDi", " w " , 'd', Items.DIAMOND_SWORD, 'g', Items.GOLDEN_SWORD, 'i', Items.IRON_SWORD, 'w', Items.WOODEN_SWORD, 'D', UCBlocks.darkBlock);
GameRegistry.addRecipe(new ItemStack(emblemScarab), "gGg", "GDG", "gGg", 'g', Items.GOLD_INGOT, 'G', Blocks.GOLD_BLOCK, 'D', UCBlocks.darkBlock);
GameRegistry.addRecipe(new ItemStack(emblemTransformation), " P ", "fDf", " f ", 'P', UCItems.generic.createStack(EnumItems.POTIONSPLASH), 'f', Items.FEATHER, 'D', UCBlocks.darkBlock);
GameRegistry.addRecipe(new ItemStack(emblemPowerfist), " p ", "BDB", " b ", 'p', Items.DIAMOND_PICKAXE, 'B', Items.BLAZE_ROD, 'b', Items.BLAZE_POWDER, 'D', UCBlocks.darkBlock);
GameRegistry.addRecipe(new ItemStack(emblemRainbow), "RGB", "YDb", "PNW", 'R', new ItemStack(Blocks.WOOL, 1, EnumDyeColor.RED.getMetadata()), 'G', new ItemStack(Blocks.WOOL, 1, EnumDyeColor.GREEN.getMetadata()), 'B', new ItemStack(Blocks.WOOL, 1, EnumDyeColor.BLUE.getMetadata()), 'Y', new ItemStack(Blocks.WOOL, 1, EnumDyeColor.YELLOW.getMetadata()), 'b', new ItemStack(Blocks.WOOL, 1, EnumDyeColor.BLACK.getMetadata()), 'P', new ItemStack(Blocks.WOOL, 1, EnumDyeColor.PURPLE.getMetadata()), 'N', new ItemStack(Blocks.WOOL, 1, EnumDyeColor.BROWN.getMetadata()), 'W', new ItemStack(Blocks.WOOL, 1, EnumDyeColor.WHITE.getMetadata()), 'D', UCBlocks.darkBlock);
GameRegistry.addRecipe(new ItemStack(emblemFood), "PPP", "PDP", "PPP", 'P', Items.POTATO, 'D', UCBlocks.darkBlock);
GameRegistry.addRecipe(new ItemStack(emblemIronstomach), "SgP", "iDe", "RdC", 'S', Items.COOKED_BEEF, 'g', Items.GOLD_INGOT, 'P', Items.COOKED_PORKCHOP, 'i', Items.IRON_INGOT, 'D', UCBlocks.darkBlock, 'e', Items.EMERALD, 'R', Items.COOKED_RABBIT, 'd', Items.DIAMOND, 'C', Items.COOKED_CHICKEN);
GameRegistry.addRecipe(new ItemStack(emblemDefense), "ABA", "SDS", "ABA", 'A', Items.ARROW, 'B', Items.BOW, 'D', UCBlocks.darkBlock, 'S', Items.SHIELD);
GameRegistry.addRecipe(new ItemStack(emblemLeaf), "lLl", "LDL", "lLl", 'l', Blocks.LEAVES, 'L', Blocks.LOG, 'D', UCBlocks.darkBlock);
GameRegistry.addShapelessRecipe(new ItemStack(emblemPacifism), emblemMelee, emblemScarab, emblemTransformation, emblemPowerfist, emblemRainbow, emblemFood, emblemIronstomach, emblemDefense, emblemLeaf);
}
示例8: init
import net.minecraftforge.fml.common.registry.GameRegistry; //导入方法依赖的package包/类
public static void init(){
//Items
GameRegistry.addShapelessRecipe(new ItemStack(Items.NETHER_STAR, 9), new ItemStack(ModBlocks.nether_star_block));
//Blocks
GameRegistry.addRecipe(new ItemStack(ModBlocks.nether_star_block), "xxx", "xxx", "xxx", 'x', new ItemStack(Items.NETHER_STAR));
}
示例9: registerRecipes
import net.minecraftforge.fml.common.registry.GameRegistry; //导入方法依赖的package包/类
@Override
public void registerRecipes()
{
GameRegistry.addShapelessRecipe(new ItemStack(this),
Items.PAPER,
Items.BLAZE_POWDER
);
}
示例10: registerRecipes
import net.minecraftforge.fml.common.registry.GameRegistry; //导入方法依赖的package包/类
@Override
public void registerRecipes()
{
// One paper, one arrow, for one blank claim order. Nice 'n easy.
GameRegistry.addShapelessRecipe(new ItemStack(this),
Items.PAPER,
Items.ARROW
);
}
示例11: addRecipe
import net.minecraftforge.fml.common.registry.GameRegistry; //导入方法依赖的package包/类
public void addRecipe() {
GameRegistry.addShapelessRecipe(new ItemStack(this),
new Object[] { Items.STICK, new ItemStack(FirmaMod.toolHeads, 1, FirmaMod.toolHeads.getSubMeta(toolMaterial.getName() + toolType.getName())) });
}
示例12: registerRecipes
import net.minecraftforge.fml.common.registry.GameRegistry; //导入方法依赖的package包/类
public static void registerRecipes()
{
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.defaultChalkItem),new ItemStack(Items.DYE,1,15), Items.DIAMOND, Items.CLAY_BALL, new ItemStack(Items.DYE,1,15), new ItemStack(Items.DYE,1,15));
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.paperScrapItem,9), Items.PAPER);
}
示例13: 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);
}
示例14: init
import net.minecraftforge.fml.common.registry.GameRegistry; //导入方法依赖的package包/类
public void init() {
// Register Recipes
GameRegistry.addRecipe(new ItemStack(blockTube, 4, 0), new Object[] { "IGI", 'I', Items.IRON_INGOT, 'G', Blocks.GLASS });
GameRegistry.addRecipe(new ItemStack(blockDisplacer, 1, 0),
new Object[] { "SHS", "ICI", "SDS", 'D', Blocks.DISPENSER, 'C', Blocks.CHEST, 'S', new ItemStack(Blocks.STONE, 1, BlockStone.EnumType.STONE.getMetadata()), 'H', Blocks.HOPPER, 'I', Items.IRON_INGOT });
GameRegistry.addRecipe(new ItemStack(itemPaintbrush, 1, 0), new Object[] { "W", "S", 'W', new ItemStack(Blocks.WOOL, 1, 0), 'S', Items.STICK });
for (int i = 0; i < 16; i++)
GameRegistry.addShapelessRecipe(new ItemStack(itemPaintbrush, 1, i + 1), new Object[] { itemPaintbrush, new ItemStack(Items.DYE, 1, EnumDyeColor.byMetadata(i).getDyeDamage()) });
GameRegistry.addRecipe(new ItemStack(itemUpgrade, 1, 0), new Object[] { "ISI", "RGB", "IDI", 'I', Items.IRON_INGOT, 'S', Items.REDSTONE, 'R', new ItemStack(Items.DYE, 1, EnumDyeColor.RED.getDyeDamage()), 'G',
new ItemStack(Items.DYE, 1, EnumDyeColor.GREEN.getDyeDamage()), 'B', new ItemStack(Items.DYE, 1, EnumDyeColor.BLUE.getDyeDamage()), 'D', Items.DIAMOND });
}
示例15: init
import net.minecraftforge.fml.common.registry.GameRegistry; //导入方法依赖的package包/类
public static void init() {
initEdibleMetals();
UCBaubles.initRecipes();
ItemStack precisionAxe = new ItemStack(UCItems.precisionAxe);
precisionAxe.addEnchantment(Enchantment.getEnchantmentByID(33), 1);
ItemStack precisionShovel = new ItemStack(UCItems.precisionShovel);
precisionShovel.addEnchantment(Enchantment.getEnchantmentByID(33), 1);
ItemStack precisionPick = new ItemStack(UCItems.precisionPick);
precisionPick.addEnchantment(Enchantment.getEnchantmentByID(33), 1);
GameRegistry.addRecipe(precisionAxe, "GG ", "GS ", " S ", 'G', UCItems.generic.createStack(EnumItems.PREGEM), 'S', Items.STICK);
GameRegistry.addRecipe(precisionPick, "GGG", " S ", " S ", 'G', UCItems.generic.createStack(EnumItems.PREGEM), 'S', Items.STICK);
GameRegistry.addRecipe(precisionShovel, " G ", " S ", " S ", 'G', UCItems.generic.createStack(EnumItems.PREGEM), 'S', Items.STICK);
GameRegistry.addShapelessRecipe(new ItemStack(UCItems.dietpills), UCItems.generic.createStack(EnumItems.ABSTRACT), UCItems.generic.createStack(EnumItems.ABSTRACT), Items.GLASS_BOTTLE);
GameRegistry.addShapelessRecipe(new ItemStack(UCItems.seedsAbstract), UCItems.generic.createStack(EnumItems.ABSTRACT));
GameRegistry.addRecipe(UCItems.generic.createStack(EnumItems.GUIDE), " N ", "WBM", " P ", 'N', new ItemStack(UCItems.seedsNormal), 'W', Items.WHEAT_SEEDS, 'M', Items.MELON_SEEDS, 'P', Items.PUMPKIN_SEEDS, 'B', Items.BOOK);
GameRegistry.addRecipe(UCItems.generic.createStack(EnumItems.EGGUPGRADE), "IEI", "EME", "IEI", 'I', Items.IRON_INGOT, 'E', Items.EGG, 'M', UCItems.generic.createStack(EnumItems.MILLENNIUMEYE));
GameRegistry.addRecipe(UCItems.generic.createStack(EnumItems.EASYBADGE), "GEG", "EQE", "GEG", 'G', Items.GOLD_INGOT, 'Q', Blocks.QUARTZ_BLOCK, 'E', UCItems.generic.createStack(EnumItems.MILLENNIUMEYE));
GameRegistry.addRecipe(new ItemStack(UCBlocks.lavalily), " C ", "CLC", " C ", 'C', UCItems.generic.createStack(EnumItems.CINDERLEAF), 'L', Blocks.WATERLILY);
GameRegistry.addRecipe(UCItems.generic.createStack(EnumItems.UPGRADE), " F ", "FBF", " F ", 'F', UCItems.generic.createStack(EnumItems.INVISIFEATHER), 'B', UCItems.generic.createStack(EnumItems.DISCOUNT));
GameRegistry.addRecipe(new ItemStack(UCItems.largeplum), "PPP", "PPP", "PPP", 'P', UCItems.generic.createStack(EnumItems.PLUM));
GameRegistry.addRecipe(new ItemStack(UCItems.goldenbread), "RRR", 'R', UCItems.generic.createStack(EnumItems.GOLDENRODS));
GameRegistry.addRecipe(UCItems.generic.createStack(EnumItems.WEEPINGEYE), "TTT", "TET", "TTT", 'T', UCItems.generic.createStack(EnumItems.WEEPINGTEAR), 'E', Items.ENDER_EYE);
GameRegistry.addRecipe(new ItemStack(UCItems.poncho), "P P", "PPP", "PPP", 'P', UCItems.generic.createStack(EnumItems.INVISIFEATHER));
GameRegistry.addRecipe(UCItems.generic.createStack(EnumItems.INVISIFEATHER), "TTT", "TFT", "TTT", 'T', UCItems.generic.createStack(EnumItems.INVISITWINE), 'F', Items.FEATHER);
GameRegistry.addRecipe(new ItemStack(UCItems.glasses3D), "I I", "I I", "BWR", 'I', Items.IRON_INGOT, 'R', new ItemStack(Blocks.STAINED_GLASS_PANE, 1, EnumDyeColor.RED.getMetadata()), 'W', new ItemStack(Blocks.WOOL, 1, EnumDyeColor.WHITE.getMetadata()), 'B', new ItemStack(Blocks.STAINED_GLASS_PANE, 1, EnumDyeColor.BLUE.getMetadata()));
GameRegistry.addRecipe(new ItemStack(UCItems.pixelglasses), "PPP", "PGP", "PPP", 'G', UCItems.glasses3D, 'P', UCItems.generic.createStack(EnumItems.PIXELS));
GameRegistry.addRecipe(UCItems.generic.createStack(EnumItems.TIMEMEAL, 3), " B ", "BCB", " B ", 'B', new ItemStack(Items.DYE, 1, EnumDyeColor.WHITE.getDyeDamage()), 'C', Items.CLOCK);
GameRegistry.addRecipe(new ItemStack(UCItems.endersnooker), "EPE", "PSP", "EPE", 'E', UCItems.generic.createStack(EnumItems.LILYTWINE), 'S', Items.STICK, 'P', Items.ENDER_PEARL);
GameRegistry.addRecipe(new ItemStack(Items.ENDER_PEARL), "EEE", "ESE", "EEE", 'E', UCItems.generic.createStack(EnumItems.LILYTWINE), 'S', Items.SNOWBALL);
GameRegistry.addRecipe(UCItems.generic.createStack(EnumItems.PREGEM), " N ", "NDN", " N ", 'N', UCItems.generic.createStack(EnumItems.PRENUGGET), 'D', Items.DIAMOND);
GameRegistry.addRecipe(new ItemStack(UCBlocks.hourglass), "DGD", "PDP", "DGD", 'G', Blocks.GOLD_BLOCK, 'P', Blocks.GLASS_PANE, 'D', UCItems.generic.createStack(EnumItems.TIMEDUST));
GameRegistry.addRecipe(new ItemStack(UCBlocks.totemhead), "LLL", "LML", " S ", 'L', Blocks.LAPIS_BLOCK, 'M', UCItems.generic.createStack(EnumItems.MILLENNIUMEYE), 'S', Items.STICK);
GameRegistry.addRecipe(UCItems.generic.createStack(EnumItems.EULA), " L ", "LBL", " L ", 'L', UCItems.generic.createStack(EnumItems.LEGALSTUFF), 'B', Items.BOOK);
GameRegistry.addRecipe(new ItemStack(UCItems.seedsArtisia), " S ", "SCS", " S ", 'S', UCItems.seedsNormal, 'C', Blocks.CRAFTING_TABLE);
GameRegistry.addRecipe(new DiscountBookRecipe());
BrewingRecipeRegistry.addRecipe(BrewingRecipeRegistry.getOutput(new ItemStack(Items.POTIONITEM), new ItemStack(Items.NETHER_WART)), UCItems.generic.createStack(EnumItems.TIMEDUST), new ItemStack(UCItems.potionreverse));
BrewingRecipeRegistry.addRecipe(new ItemStack(UCItems.potionreverse), new ItemStack(Items.GUNPOWDER), UCItems.generic.createStack(EnumItems.POTIONSPLASH));
for (EnumDyeColor dye : EnumDyeColor.values()) {
addSeedRecipe(getDyeCraftingResult(dye.getDyeDamage()), new ItemStack(Items.DYE, 1, dye.getMetadata()), UCItems.generic.createStack(EnumItems.ESSENCE), UCItems.generic.createStack(EnumItems.ESSENCE));
}
addSeedRecipe(new ItemStack(UCItems.seedsCinderbella), new ItemStack(Items.SUGAR), new ItemStack(Items.WHEAT_SEEDS), new ItemStack(UCItems.seedsNormal));
addSeedRecipe(new ItemStack(UCItems.seedsCollis), new ItemStack(Items.SUGAR), new ItemStack(UCItems.seedsNormal), new ItemStack(UCItems.seedsCinderbella));
addSeedRecipe(new ItemStack(UCItems.seedsDirigible), new ItemStack(Items.SUGAR), new ItemStack(Items.PUMPKIN_SEEDS), new ItemStack(UCItems.seedsCollis));
addSeedRecipe(new ItemStack(UCItems.seedsEnderlily), new ItemStack(Items.ENDER_EYE), new ItemStack(Items.ENDER_PEARL), new ItemStack(UCItems.seedsDirigible));
addSeedRecipe(new ItemStack(UCItems.seedsInvisibilia), new ItemStack(Items.SUGAR), new ItemStack(Blocks.GLASS), new ItemStack(UCItems.seedsCinderbella));
addSeedRecipe(new ItemStack(UCItems.seedsKnowledge), new ItemStack(Items.SUGAR), new ItemStack(Items.ENCHANTED_BOOK), new ItemStack(UCItems.seedsInvisibilia));
addSeedRecipe(new ItemStack(UCItems.seedsMaryjane), new ItemStack(Items.BLAZE_ROD), new ItemStack(Items.BLAZE_POWDER), new ItemStack(UCItems.seedsCollis));
addSeedRecipe(new ItemStack(UCItems.seedsMerlinia), new ItemStack(Items.PUMPKIN_SEEDS), UCItems.generic.createStack(EnumItems.TIMEMEAL), new ItemStack(UCItems.seedsEnderlily));
addSeedRecipe(new ItemStack(UCItems.seedsMillennium), new ItemStack(Items.CLOCK), new ItemStack(Items.PUMPKIN_SEEDS), new ItemStack(UCItems.seedsMerlinia));
addSeedRecipe(new ItemStack(UCItems.seedsMusica), new ItemStack(Blocks.JUKEBOX), new ItemStack(UCItems.seedsNormal), new ItemStack(UCItems.seedsMaryjane));
addSeedRecipe(new ItemStack(UCItems.seedsPrecision), new ItemStack(Items.GOLD_NUGGET), new ItemStack(UCItems.seedsCollis), new ItemStack(UCItems.seedsInvisibilia));
addSeedRecipe(new ItemStack(UCItems.seedsWeepingbells), new ItemStack(Items.GHAST_TEAR), new ItemStack(Items.MELON_SEEDS), new ItemStack(UCItems.seedsEnderlily));
addSeedRecipe(new ItemStack(UCItems.seedsAbstract), new ItemStack(Items.REEDS), new ItemStack(Blocks.STAINED_HARDENED_CLAY), new ItemStack(Blocks.WOOL));
addSeedRecipe(new ItemStack(UCItems.seedsCobblonia), new ItemStack(Blocks.COBBLESTONE), new ItemStack(Blocks.STONEBRICK), new ItemStack(UCItems.seedsNormal));
addSeedRecipe(new ItemStack(UCItems.seedsDyeius), new ItemStack(Blocks.WOOL), new ItemStack(Items.DYE), new ItemStack(UCItems.seedsAbstract));
addSeedRecipe(new ItemStack(UCItems.seedsEula), new ItemStack(Items.PAPER), new ItemStack(Items.BOOK), new ItemStack(UCItems.seedsCobblonia));
addSeedRecipe(new ItemStack(UCItems.seedsFeroxia), new ItemStack(Items.CLAY_BALL), new ItemStack(UCItems.seedsKnowledge), new ItemStack(UCItems.seedsWeepingbells));
addSeedRecipe(new ItemStack(UCItems.seedsWafflonia), new ItemStack(Items.WHEAT_SEEDS), new ItemStack(Items.BREAD), new ItemStack(Items.SUGAR));
addSeedRecipe(new ItemStack(UCItems.seedsPixelsius), new ItemStack(UCItems.seedsWafflonia), new ItemStack(Items.DYE, 1, EnumDyeColor.BLACK.getDyeDamage()), new ItemStack(Items.PAINTING));
addSeedRecipe(new ItemStack(UCItems.seedsDevilsnare), new ItemStack(UCItems.seedsPixelsius), new ItemStack(Items.STICK), new ItemStack(Blocks.LOG));
addSeedRecipe(new ItemStack(UCItems.seedsMalleatoris), new ItemStack(UCItems.seedsPrecision), new ItemStack(Blocks.ANVIL), new ItemStack(Items.IRON_INGOT));
addSeedRecipe(new ItemStack(UCItems.seedsPetramia), new ItemStack(UCItems.seedsCobblonia), new ItemStack(Blocks.OBSIDIAN), new ItemStack(Blocks.COBBLESTONE));
}