Solved How do I smelt a custom item?

Discussion in 'Plugin Development' started by PureAspiration, Oct 16, 2020.

  1. Offline

    PureAspiration

    So I have 2 items, a piece of cobblestone and a piece of stone. I want to create a recipe so that I can smelt the stone into cobblestone but with the custom names and metadata. How would I do that?


    Code:
    public static ItemStack something;
    public static void itemSomething() {
      ItemStack item = newItemStack(Material.Cobblestone, 1)
      ItemMeta meta = item.getItemMeta();
      meta.setdisplayName("Super Cobblestone")
      item.setItemMeta(meta);
      something = item;
    }
    
    public static ItemStack somethingelse;
    public static void itemSomethingElse() {
      ItemStack item = newItemStack(Material.Stone, 1)
      ItemMeta meta = item.getItemMeta();
      meta.setdisplayName("Super Stone")
      item.setItemMeta(meta);
      somethingelse = item;
    
      FurnaceRecipe recipe = new
      FurnaceRecipe(NamespaceKey.minecraft("super_stone"), item, <the stone would be here>, 1.0f, 200)
      bukkit.getServer.addRecipe(recipe)
    }
    Thanks
     
  2. Offline

    Kars

Share This Page