Change Craft result of standard crafting recipe's

Discussion in 'Plugin Development' started by greaperc4, Sep 11, 2013.

Thread Status:
Not open for further replies.
  1. Hello,
    I want to set different Items on the Standard crafting recipe's..
    I don't know if I should do:

    Code:java
    1. ItemStack item = new ItemStack(Material.END_STONE, 1);
    2. ShapedRecipe sr = new ShapedRecipe(item);
    3. sr.shape("DDD"," S "," S ");
    4. sr.setIngredient('D', Material.DIAMOND);
    5. sr.setIngredient('S', Material.STICK);
    6. return sr;


    or something else

    Thanks for helping!
     
  2. Offline

    Janmm14

    There is the possibility to use an event from org.bukkit.event.inventory
     
  3. That was not really what I was asking for...
     
  4. Offline

    valon750

    greaperc4

    Is there a method of removing the already set recipes?

    I think there's a method called clearRecipes, but I'm not sure if that's individuals, or all of them.

    If all else fails, a simple PrepareItemCraftEvent would suffice.
     
  5. Offline

    PatoTheBest

    On the onEnable(), put getServer().registerrecipe or something like that. its getServer().register(something)
     
  6. thats also not what I'm asking, I ask if i can just "remake" the recipe but then with a another Item... or if i need to make a Event for that. and that would be the "PrepareItemCraftEvent"
     
  7. Offline

    Janmm14

    Use PrepareItemCraftEvent and CraftItemEvent.
     
Thread Status:
Not open for further replies.

Share This Page