本文整理汇总了Java中cpw.mods.fml.common.registry.GameRegistry.addRecipe方法的典型用法代码示例。如果您正苦于以下问题:Java GameRegistry.addRecipe方法的具体用法?Java GameRegistry.addRecipe怎么用?Java GameRegistry.addRecipe使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cpw.mods.fml.common.registry.GameRegistry
的用法示例。
在下文中一共展示了GameRegistry.addRecipe方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addRecipes
import cpw.mods.fml.common.registry.GameRegistry; //导入方法依赖的package包/类
@Override
public void addRecipes()
{
if (this.Enabled)
{
// One redstone sprayer (empty)
GameRegistry.addRecipe(new ItemStack(this, 1 , this.getMaxDamage()), "zxz", "aba", "zyz",
'x', Blocks.piston,
'y', Blocks.tripwire_hook,
'z', Items.iron_ingot,
'a', Items.repeater,
'b', Blocks.sticky_piston
);
}
else if (Main.noCreative) { this.setCreativeTab(null); } // Not enabled and not allowed to be in the creative menu
Helper.registerAmmoRecipe(LargeRedstoneMagazine.class, this);
}
示例2: addRecipes
import cpw.mods.fml.common.registry.GameRegistry; //导入方法依赖的package包/类
@Override
public void addRecipes()
{
if (this.Enabled)
{
// One Improved Rocket Launcher (empty)
GameRegistry.addRecipe(new ItemStack(this, 1 , this.getMaxDamage()), "xxx", "yzy", "xxx",
'x', Blocks.obsidian, // Adding an obsidian frame to the RPG
'y', Items.iron_ingot,
'z', Helper.getWeaponStackByClass(RPG.class, true)
);
}
else if (Main.noCreative) { this.setCreativeTab(null); } // Not enabled and not allowed to be in the creative menu
// Fill the launcher with 1 big rocket
Helper.makeAmmoRecipe(Helper.getAmmoStack(LargeRocket.class, 0), 1, 1, this.getMaxDamage(), this);
}
示例3: addRecipes
import cpw.mods.fml.common.registry.GameRegistry; //导入方法依赖的package包/类
@Override
public void addRecipes()
{
if (this.Enabled)
{
// One Fen Fire (empty)
GameRegistry.addRecipe(new ItemStack(this, 1 , this.getMaxDamage()), "di ", "i i", " ts",
't', Blocks.tripwire_hook,
'i', Items.iron_ingot,
's', Blocks.sticky_piston,
'd', Blocks.trapdoor
);
}
else if (Main.noCreative) { this.setCreativeTab(null); } // Not enabled and not allowed to be in the creative menu
ItemStack stack = new ItemStack(Blocks.glowstone);
Helper.makeAmmoRecipe(stack, 1, 4, this.getMaxDamage(), this);
Helper.makeAmmoRecipe(stack, 2, 8, this.getMaxDamage(), this);
Helper.makeAmmoRecipe(stack, 3, 12, this.getMaxDamage(), this);
Helper.makeAmmoRecipe(stack, 4, 16, this.getMaxDamage(), this);
Helper.makeAmmoRecipe(stack, 5, 20, this.getMaxDamage(), this);
Helper.makeAmmoRecipe(stack, 6, 24, this.getMaxDamage(), this);
Helper.makeAmmoRecipe(stack, 7, 28, this.getMaxDamage(), this);
Helper.makeAmmoRecipe(stack, 8, 32, this.getMaxDamage(), this);
}
示例4: addRecipes
import cpw.mods.fml.common.registry.GameRegistry; //导入方法依赖的package包/类
@Override
public void addRecipes()
{
if (this.Enabled)
{
GameRegistry.addRecipe(new ItemStack(this, 1 , this.getMaxDamage()), "ihi", "bpb", "tsi",
't', Blocks.tripwire_hook,
'b', Blocks.iron_bars,
'i', Items.iron_ingot,
'h', Blocks.hopper,
's', Blocks.sticky_piston,
'p', Blocks.piston
);
}
else if (Main.noCreative) { this.setCreativeTab(null); } // Not enabled and not allowed to be in the creative menu
// Ammo
Helper.registerAmmoRecipe(NeedleMagazine.class, this);
}
示例5: addRecipes
import cpw.mods.fml.common.registry.GameRegistry; //导入方法依赖的package包/类
@Override
public void addRecipes()
{
if (this.Enabled)
{
// One lapis coil (empty)
GameRegistry.addRecipe(new ItemStack(this, 1 , this.getMaxDamage()), "z z", "axa", " y ",
'x', Blocks.piston,
'y', Blocks.lever,
'z', Items.iron_ingot,
'a', Items.repeater
);
}
else if (Main.noCreative) { this.setCreativeTab(null); } // Not enabled and not allowed to be in the creative menu
Helper.registerAmmoRecipe(LapisMagazine.class, this);
}
示例6: addRecipes
import cpw.mods.fml.common.registry.GameRegistry; //导入方法依赖的package包/类
@Override
public void addRecipes()
{
if (this.Enabled)
{
// One compact crossbow (empty)
GameRegistry.addRecipe(new ItemStack(this, 1 , this.getMaxDamage()), "zxy", "xzy", "zxy",
'x', Items.stick,
'y', Items.string,
'z', Blocks.planks
);
}
else if (Main.noCreative) { this.setCreativeTab(null); } // Not enabled and not allowed to be in the creative menu
GameRegistry.addShapelessRecipe(new ItemStack(this), // Fill the empty crossbow with one arrow
Items.arrow,
new ItemStack(this, 1 , this.getMaxDamage())
);
}
示例7: registerRepair
import cpw.mods.fml.common.registry.GameRegistry; //导入方法依赖的package包/类
private void registerRepair()
{
ItemStack[] repair = new ItemStack[9];
// Top row
//repair[0] = new ItemStack(Item.getItemFromBlock(Blocks.obsidian));
repair[1] = new ItemStack(Blocks.golden_rail);
//repair[2] = new ItemStack(Item.getItemFromBlock(Blocks.obsidian));
// Middle row
repair[3] = new ItemStack(Blocks.golden_rail);
repair[4] = new ItemStack(this, 1 , this.getMaxDamage());
repair[5] = new ItemStack(Blocks.golden_rail);
// Bottom row
repair[6] = new ItemStack(Items.redstone);
repair[7] = new ItemStack(Items.iron_ingot);
repair[8] = new ItemStack(Items.redstone);
GameRegistry.addRecipe(new Recipe_ERA(repair, new ItemStack(this)));
}
示例8: addRecipes
import cpw.mods.fml.common.registry.GameRegistry; //导入方法依赖的package包/类
@Override
public void addRecipes()
{
if (this.Enabled)
{
// One wither rifle (empty)
GameRegistry.addRecipe(new ItemStack(this, 1 , this.getMaxDamage()), "odo", "owo", "oso",
'o', Blocks.obsidian,
'd', Items.diamond,
's', Items.nether_star,
'w', Helper.getWeaponStackByClass(OSR.class, true)
);
}
else if (Main.noCreative) { this.setCreativeTab(null); } // Not enabled and not allowed to be in the creative menu
// Reloading with obsidian magazine, setting its ammo metadata as ours (Need to be empty for that)
Helper.registerAmmoRecipe(ObsidianMagazine.class, this);
}
示例9: addRecipes
import cpw.mods.fml.common.registry.GameRegistry; //导入方法依赖的package包/类
@Override
public void addRecipes()
{
if (this.Enabled)
{
// One blaze crossbow (empty)
GameRegistry.addRecipe(new ItemStack(this, 1 , this.getMaxDamage()), "bib", "ici", "bib",
'b', Items.blaze_powder,
'i', Items.iron_ingot,
'c', Helper.getWeaponStackByClass(Crossbow_Compact.class, true)
);
}
else if (Main.noCreative) { this.setCreativeTab(null); } // Not enabled and not allowed to be in the creative menu
GameRegistry.addShapelessRecipe(new ItemStack(this), // Fill the empty blaze crossbow with one rod
Items.blaze_rod,
new ItemStack(this, 1 , this.getMaxDamage())
);
}
示例10: initShapedRecipies
import cpw.mods.fml.common.registry.GameRegistry; //导入方法依赖的package包/类
public static void initShapedRecipies()
{
if(ConfigurationKorTech.cheapRecipe)
{
GameRegistry.addRecipe(new ItemStack(ModBlocks.tank),new Object[]{"GGG","G G","GGG", 'G', Blocks.glass});
}
else
{
GameRegistry.addRecipe(new ItemStack(ModBlocks.tank),new Object[]{"GGG","G G","GGG", 'G', Blocks.gold_block});
}
}
示例11: addRecipes
import cpw.mods.fml.common.registry.GameRegistry; //导入方法依赖的package包/类
@Override
public void addRecipes()
{
if (this.Enabled)
{
GameRegistry.addRecipe(new ItemStack(this, 1 , this.getMaxDamage()), "ihi", "gpg", "tsi",
'p', Blocks.piston,
's', Blocks.sticky_piston,
't', Blocks.tripwire_hook,
'i', Items.iron_ingot,
'h', Blocks.hopper,
'g', Blocks.glass_pane
);
}
else if (Main.noCreative) { this.setCreativeTab(null); } // Not enabled and not allowed to be in the creative menu
// Making web out of string
GameRegistry.addRecipe(new ItemStack(Blocks.web), "s s", " s ", "s s",
's', Items.string
);
// Ammo
ItemStack stack = new ItemStack(Blocks.web);
Helper.makeAmmoRecipe(stack, 1, 1, this.getMaxDamage(), this);
Helper.makeAmmoRecipe(stack, 2, 2, this.getMaxDamage(), this);
Helper.makeAmmoRecipe(stack, 3, 3, this.getMaxDamage(), this);
Helper.makeAmmoRecipe(stack, 4, 4, this.getMaxDamage(), this);
Helper.makeAmmoRecipe(stack, 5, 5, this.getMaxDamage(), this);
Helper.makeAmmoRecipe(stack, 6, 6, this.getMaxDamage(), this);
Helper.makeAmmoRecipe(stack, 7, 7, this.getMaxDamage(), this);
Helper.makeAmmoRecipe(stack, 8, 8, this.getMaxDamage(), this);
}
示例12: addRecipes
import cpw.mods.fml.common.registry.GameRegistry; //导入方法依赖的package包/类
@Override
public void addRecipes()
{
GameRegistry.addRecipe(new ItemStack(this, 1, this.getMaxDamage()), "x x", "x x", "xgx",
'x', Blocks.glass_pane,
'g', new ItemStack(Items.dye, 1, 4)
);
}
示例13: addRecipes
import cpw.mods.fml.common.registry.GameRegistry; //导入方法依赖的package包/类
@Override
public void addRecipes()
{
if (this.Enabled)
{
// One Flint Duster (Empty)
GameRegistry.addRecipe(new ItemStack(this, 1 , this.getMaxDamage()), "qhq", "qpq", "tsi",
'p', Blocks.piston,
's', Blocks.sticky_piston,
'h', Blocks.hopper,
'q', Blocks.quartz_block,
'i', Items.iron_ingot,
't', Blocks.tripwire_hook
);
}
else if (Main.noCreative) { this.setCreativeTab(null); } // Not enabled and not allowed to be in the creative menu
ItemStack stack = Helper.getAmmoStack(BoxOfFlintDust.class, 0);
Helper.makeAmmoRecipe(stack, 1, 32, this.getMaxDamage(), this);
Helper.makeAmmoRecipe(stack, 2, 64, this.getMaxDamage(), this);
Helper.makeAmmoRecipe(stack, 3, 92, this.getMaxDamage(), this);
Helper.makeAmmoRecipe(stack, 4, 128, this.getMaxDamage(), this);
Helper.makeAmmoRecipe(stack, 5, 160, this.getMaxDamage(), this);
Helper.makeAmmoRecipe(stack, 6, 192, this.getMaxDamage(), this);
Helper.makeAmmoRecipe(stack, 7, 224, this.getMaxDamage(), this);
Helper.makeAmmoRecipe(stack, 8, 256, this.getMaxDamage(), this);
}
示例14: addRecipes
import cpw.mods.fml.common.registry.GameRegistry; //导入方法依赖的package包/类
@Override
public void addRecipes()
{
GameRegistry.addRecipe(new ItemStack(this, 1, this.getMaxDamage()), "x x", "x x", "xox",
'x', Items.iron_ingot,
'o', Blocks.obsidian
);
}
示例15: registerRecipes
import cpw.mods.fml.common.registry.GameRegistry; //导入方法依赖的package包/类
private static void registerRecipes() {
GameRegistry.addRecipe(new ItemStack(sensorBlock), "xzx", "xyx", "xzx",
'x', new ItemStack(Blocks.iron_block),
'y', new ItemStack(Items.ender_pearl),
'z', new ItemStack(Items.redstone));
GameRegistry.addRecipe(new ItemStack(blankSensor), "yzy", " ", "yzy",
'y', new ItemStack(Items.paper),
'z', new ItemStack(Items.redstone));
GameRegistry.addRecipe(new ItemStack(worldSensor), " z ", "xxx", " y ",
'x', new ItemStack(Blocks.dirt),
'y', new ItemStack(Items.redstone),
'z', new ItemStack(blankSensor));
}