Custom crafting recipes

Discussion in 'Plugin Development' started by HeyAwesomePeople, Jan 22, 2014.

Thread Status:
Not open for further replies.
  1. I know, I know. I can search google and find the answer to this question, but I am here to ask weather or not what I am trying to do is possible. Here's what I am trying to do:

    I want to make a crafting recipe so that when a player say places a wooden sword into a crafting table along with a paper(as shown below) it will add 10 durability to the sword, making it last longer.

    Is this possible? If so, how? Thanks
     
  2. Offline

    Wantsome909

  3. Wantsome909 How exactly? I'm experimenting with the CraftItemEvent right now but cannot figure it out.
     
  4. Offline

    CraftBang

  5. sgavster Could use some help please :)
     
  6. Offline

    CraftBang

    HeyAwesomePeople sorry bro, it's 1:31 AM I was going to bed so I thought lets try help this guy out very quickly, read over your story :p.
     
  7. Offline

    xTrollxDudex

    HeyAwesomePeople
    Use reflection to access the result field in your recipe. You can cast to ShapedRecipe or ShapelessRecipe (whose result field is actually "output" ) depending on the situation. Then you can set it to a particular itemstack.
     
Thread Status:
Not open for further replies.

Share This Page