RecipeFeature.java 文件源码

java
阅读 32 收藏 0 点赞 0 评论 0

项目:ultrahardcore 作者:
/**
 * Add our recipes
 */
@Override
protected void enableCallback()
{
    //Make a recipe that will return a golden carrot when the right shape is made
    ShapedRecipe newGoldenCarrot = new ShapedRecipe(new ItemStack(Material.GOLDEN_CARROT, 1));
    //8 gold ingots surrounding an apple
    newGoldenCarrot.shape("AAA", "ABA", "AAA");
    newGoldenCarrot.setIngredient('A', Material.GOLD_INGOT);
    newGoldenCarrot.setIngredient('B', Material.CARROT_ITEM);
    Bukkit.addRecipe(newGoldenCarrot);

    //Make the recipe for glistering melons minus a set shape (glistering melon is speckled melon in code
    ShapelessRecipe newGlisteringMelon = new ShapelessRecipe(new ItemStack(Material.SPECKLED_MELON, 1));
    //1 gold ingot with a melon
    newGlisteringMelon.addIngredient(Material.GOLD_BLOCK);
    newGlisteringMelon.addIngredient(Material.MELON);
    Bukkit.addRecipe(newGlisteringMelon);
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号