1.16.5 I want to cook Potion

Discussion in 'Spigot Plugin Development' started by YangJJune, Jul 10, 2021.

  1. Code (Java):
    res = new ItemStack(Material.POTION);
            im = res.getItemMeta();
            PotionMeta pm = (PotionMeta) im;
            PotionData pd = new PotionData(PotionType.WATER);
            pm.setBasePotionData(pd);
            res.setItemMeta(pm);
            key = new NamespacedKey(this,"waterPurification");
            fRecipe = new FurnaceRecipe(key,res,Material.POTION,0,20*30);
            getServer().addRecipe(fRecipe);
    I want to boil potion, and result is water bottle.
    But it doesn't work.
    Any problem?