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


Java GameRegistry.addRecipe方法代碼示例

本文整理匯總了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);
}
 
開發者ID:Domochevsky,項目名稱:minecraft-quiverbow,代碼行數:19,代碼來源:RedSprayer.java

示例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);
}
 
開發者ID:Domochevsky,項目名稱:minecraft-quiverbow,代碼行數:18,代碼來源:RPG_Imp.java

示例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);
}
 
開發者ID:Domochevsky,項目名稱:minecraft-quiverbow,代碼行數:27,代碼來源:FenFire.java

示例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);
}
 
開發者ID:Domochevsky,項目名稱:minecraft-quiverbow,代碼行數:20,代碼來源:ProximityNeedler.java

示例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);
}
 
開發者ID:Domochevsky,項目名稱:minecraft-quiverbow,代碼行數:18,代碼來源:LapisCoil.java

示例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())
			);
}
 
開發者ID:Domochevsky,項目名稱:minecraft-quiverbow,代碼行數:20,代碼來源:Crossbow_Compact.java

示例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)));
}
 
開發者ID:Domochevsky,項目名稱:minecraft-quiverbow,代碼行數:22,代碼來源:ERA.java

示例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);
}
 
開發者ID:Domochevsky,項目名稱:minecraft-quiverbow,代碼行數:19,代碼來源:OWR.java

示例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())
			);
}
 
開發者ID:Domochevsky,項目名稱:minecraft-quiverbow,代碼行數:20,代碼來源:Crossbow_Blaze.java

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

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

示例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)
	 );
}
 
開發者ID:Domochevsky,項目名稱:minecraft-quiverbow,代碼行數:9,代碼來源:LapisMagazine.java

示例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);
}
 
開發者ID:Domochevsky,項目名稱:minecraft-quiverbow,代碼行數:29,代碼來源:FlintDuster.java

示例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
	 );
}
 
開發者ID:Domochevsky,項目名稱:minecraft-quiverbow,代碼行數:9,代碼來源:ObsidianMagazine.java

示例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));
}
 
開發者ID:PC-Logix,項目名稱:OpenSensors,代碼行數:14,代碼來源:ContentRegistry.java


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