A few months back I made it my mission to add as many recipes as possible to a certain spoon via pull requests. Since I have limited PHP coding abilities; but good technical skills, I thought this was a good way to contribute. I tested crafting each item in MCPE single player, adjusted the recipe code in CraftingManager.php (matching the existing coding style), and then tested thoroughly before making each pull request. I thought I might try the same on PMMP, but am unfamiliar with the new recipes.json method. Can anyone walk me through how the recipes.json file is created/maintained? Is it automatically generated from a decode of the MCPE client? Is it built using some magical tools by gurun? Has it been built by hand (if so, is there a recommended JSON editor)? Thanks for any info on this. I hope I can be of help to the project.
It's very simple. Types: 0: Shapeless Recipe that can't be crafted 1: A Crafting Table Recipe 2-3: A Furnace Recipe Width: The amount of horizontal items the crafting table takes. Max is 3 because crafting table only has 3 horizontal slots. Height: The amount of vertical items the crafting table takes. Max is 3 because crafting table only has 3 vertical slots. Input is the items it takes to craft the recipe only for Shaped Recipes or Furnace Recipe. THE ORDER of the recipe goes from RIGHT TO LEFT, it DOES NOT go from top to bottom. The format: id: the id of the item(s) it requires in order to craft the output item. damage: the damage/meta the item needs to have, but a item that can be used to craft does not take damage so it will stay as '0'. count: the amount of the item(s) in a single slot that it requires to craft the output item. nbt: I really don't know, probably some NTB tags. For example a diamond sword: If you understood what I just explained, you might understand how the diamond sword or any other recipe works. Here's the diamond sword recipe: https://github.com/pmmp/PocketMine-...0/src/pocketmine/resources/recipes.json#L1185 Finally, the output: id: the id of the item the recipe outputs. See list of item IDs here: http://minecraft.gamepedia.com/Pocket_Edition_data_values damage: the damage/meta of the item the recipe outputs. count: the amount of items the recipe outputs. nbt: I really don't know, probably some NTB tags. About the uuid , no idea. You might wanna ask someone else.
Thank you so much xBeastMode! I really appreciate all the time you took to post the details! I may need to use wireshark or similar to figure out the UUID. I will experiment and report back. I guess the only question I have left is: How was the recipes.json originally generated? If there is some automation that does this, then it would be pointless for me to make pull requests for fixes (because it would just be replaced in mass). If it was built manually then I can help manually fix it.
Apparently the recipes.json file IS generated automatically; so I will hold off on working on this by hand. I had been busy working on other things anyway; so was happily surprised by dktapps commit today See Commit 736ec6e