本文整理匯總了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);
}
示例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());
}
示例3: registerWand
import org.bukkit.Bukkit; //導入方法依賴的package包/類
public void registerWand(Wand wand) {
this.wands.add(wand);
if (wand.getRecipe() != null) {
Bukkit.addRecipe(wand.getRecipe());
}
}
示例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));
}
示例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);
}
示例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);
}