本文整理汇总了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);
}