new recipes

Discussion in 'Plugin Development' started by tschagg, Feb 6, 2013.

Thread Status:
Not open for further replies.
  1. Offline

    tschagg

    hey guys

    I have made a new recepie for a craftable item in Bukkit, and I want to use this in the recipe of another new craftable item.

    is that possible?
     
  2. Offline

    teunie75

    You mean the endproduct?
    Yes.
    If you mean to replace the recipe, thats a little bit harder.
     
  3. Offline

    Skruf

    i want to craft this:

    NewRecipeItem1 + Randomitem = NewRecipeItem2
     
  4. Offline

    teunie75

    Get the item from RecipeItem1 and make a recipe to get RecipeItem2
     
  5. Offline

    Skruf

    yeah ^^^

    but how i get the recipe1item ?

    .setIngredient('*', RECIPE1ITEM)

    what i've to type there?
     
  6. Offline

    teunie75

    Code:
    <recipe here>.setIngredient('String', <ItemStack of recipe 1>);
     
  7. Offline

    Skruf

    hm this isnt workin.

    i took:

    weed.setIngredient('&', result);

    item1:
    ItemStack result = new ItemStack(Material.WHEAT);
    ItemMeta im = result.getItemMeta();
    ShapedRecipe weed = new ShapedRecipe(result)
     
  8. Offline

    Digi

    Telling why is not working would help :}
     
  9. Offline

    Skruf

    when i type in weed.setIngredient('&', result);

    , the setIngredient is red underlined in Eclipse, error: is not applicable for the agument
     
  10. Offline

    Digi

    setIngredient()'s 2nd argument accepts only Material, you can't set an itemstack.
    You could just use result.getType() to get the material... and it would be wise to use result.getDurability() as 3rd argument of setIngredient() too.

    A quick question, do you really want to learn or you just want the end product ? If you just want the plugin I suggest you post in requests because you'll be wasting your time and our time here :p
    But if you want to learn, keep trying, keep searching and whenever you're just absolutely stuck then post.
     
  11. Offline

    Skruf

    i want to learn! im trying for hours ^^
     
  12. Offline

    Jeyge

    1st thing to learn is to not hijack someones thread. Poor tschagg is never going to get his question answered.
     
Thread Status:
Not open for further replies.

Share This Page