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


Java Bukkit.addRecipe方法代碼示例

本文整理匯總了Java中org.bukkit.Bukkit.addRecipe方法的典型用法代碼示例。如果您正苦於以下問題:Java Bukkit.addRecipe方法的具體用法?Java Bukkit.addRecipe怎麽用?Java Bukkit.addRecipe使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.bukkit.Bukkit的用法示例。


在下文中一共展示了Bukkit.addRecipe方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: registerRecipe

import org.bukkit.Bukkit; //導入方法依賴的package包/類
public void registerRecipe(){
    ItemStack i = getPokeEgg();

    ShapedRecipe pokeEgg = new ShapedRecipe(i);

    pokeEgg.shape("BAB", "DCD", "BAB");

    pokeEgg.setIngredient('B', Material.WOOL);
    pokeEgg.setIngredient('A', Material.STRING);
    pokeEgg.setIngredient('D', Material.GOLD_NUGGET);
    pokeEgg.setIngredient('C', Material.EGG);

    Bukkit.addRecipe(pokeEgg);
}
 
開發者ID:cadox8,項目名稱:WC,代碼行數:15,代碼來源:PokeEgg.java

示例2: initRecipes

import org.bukkit.Bukkit; //導入方法依賴的package包/類
public static void initRecipes() {
	if (!TransportPipes.instance.generalConf.isCraftingEnabled()) {
		return;
	}
	for (PipeType pt : PipeType.values()) {
		Bukkit.addRecipe(TransportPipes.instance.recipesConf.createPipeRecipe(pt, null));
		if (pt == PipeType.COLORED) {
			for (PipeColor pc : PipeColor.values()) {
				Bukkit.addRecipe(TransportPipes.instance.recipesConf.createPipeRecipe(pt, pc));
			}
		}
	}

	Bukkit.addRecipe(TransportPipes.instance.recipesConf.createWrenchRecipe());
}
 
開發者ID:RoboTricker,項目名稱:Transport-Pipes,代碼行數:16,代碼來源:CraftUtils.java

示例3: registerWand

import org.bukkit.Bukkit; //導入方法依賴的package包/類
public void registerWand(Wand wand) {
	this.wands.add(wand);
	if (wand.getRecipe() != null) {
		Bukkit.addRecipe(wand.getRecipe());
	}
}
 
開發者ID:mcardy,項目名稱:MystiCraft,代碼行數:7,代碼來源:WandManager.java

示例4: BottledExpListener

import org.bukkit.Bukkit; //導入方法依賴的package包/類
public BottledExpListener() {
    // if we don't create a fake custom recipe, players won't be able to craft it.
    Bukkit.addRecipe(new ShapelessRecipe(createExpBottle(1)).addIngredient(Material.GLASS_BOTTLE));
}
 
開發者ID:funkemunky,項目名稱:HCFCore,代碼行數:5,代碼來源:BottledExpListener.java

示例5: bocataJamon

import org.bukkit.Bukkit; //導入方法依賴的package包/類
public void bocataJamon(){
    ItemStack i = getBocataJamon();

    ShapelessRecipe pokeEgg = new ShapelessRecipe(i);

    pokeEgg.addIngredient(2, Material.BREAD);
    pokeEgg.addIngredient(Material.GRILLED_PORK);

    Bukkit.addRecipe(pokeEgg);
}
 
開發者ID:cadox8,項目名稱:PA,代碼行數:11,代碼來源:Bocatas.java

示例6: hamburguesa

import org.bukkit.Bukkit; //導入方法依賴的package包/類
public void hamburguesa(){
    ItemStack i = getHambur();

    ShapelessRecipe pokeEgg = new ShapelessRecipe(i);

    pokeEgg.addIngredient(2, Material.BREAD);
    pokeEgg.addIngredient(Material.COOKED_BEEF);

    Bukkit.addRecipe(pokeEgg);
}
 
開發者ID:cadox8,項目名稱:PA,代碼行數:11,代碼來源:Bocatas.java


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