*** Recipe Updates *** - Printable Version +- Cuberite Forum (https://forum.cuberite.org) +-- Forum: Cuberite (https://forum.cuberite.org/forum-4.html) +--- Forum: Development (https://forum.cuberite.org/forum-13.html) +--- Thread: *** Recipe Updates *** (/thread-423.html) |
RE: *** Recipe Updates *** - Luksor - 06-03-2012 (06-03-2012, 08:39 PM)xoft Wrote: Luksor, I put the items.ini in. I decided not to delete most of the stuff you deleted, for compatibility reasons. So the lightstonedust staysOk RE: *** Recipe Updates *** - NiLSPACE - 06-03-2012 creating a map is more difficult than i thougd it confuses me that you say something different then the recipe.txt are there 2 ways?? yay got it the line is 3x3,1:2:339:1,1:3:339:1,1:1:339:1,2:1:339:1,3:1:339:1,3:2:339:1,3:3:339:1,2:3:339:1,2:2:345:1@358:1 #-> Map RE: *** Recipe Updates *** - xoft - 06-03-2012 I was proposing a new format to replace the current recipes.txt format: https://forum.cuberite.org/showthread.php?tid=423&pid=3096#pid3096 RE: *** Recipe Updates *** - xoft - 06-03-2012 I have written a parser for the new grammar, its code is even a bit shorter than the old parser, and I'd say it's much more cleaner, as it's separated into several functions etc. Now I need to write the recipe matching - get the recipe that represents the current arrangement on the crafting table. This is gonna be a bit more difficult It seems that the "*:2"-style coords would make the recipe matcher too complicated. I think I'll step down from that feature. So the coord grammar is revised: Code: <IngredientN> = <ItemType>, <Coord1>, <Coord2>, ... <CordN> Note that "anywhere" may match already matched items, so the following recipe wouldn't work: Code: # Sticks: RE: *** Recipe Updates *** - FakeTruth - 06-04-2012 I like your recipes syntax much more than the one used right now The only difficulty I see with it, is comparing the user input to a recipe with the "*:2"-style coords Which you already seem to have encountered RE: *** Recipe Updates *** - Luksor - 06-04-2012 I'm leaving on a school trip tomorrow, so i wont be able to work on the recipes until Thursday. See you later. RE: *** Recipe Updates *** - xoft - 06-04-2012 I'll keep both recipe formats in for the time being, then. If I manage to finish them at all FakeTruth, I'm glad you like it. I hope you'll like the parser, too It seems that I accidentally managed to get even the "*:1" coords working. The only problem with them is if you combine two such definitions in a crossing directions, such as "*:1, 1:*". Then the recipe matcher may be unable to match the recipe to a crafting grid of "1:1, 2:1". But hey, I don't think there's any such recipe RE: *** Recipe Updates *** - xoft - 06-04-2012 A few details: Which of the following formats do you think is the best? Format 1 (as specified earlier): Code: <Ingredient1> | <Ingredient2> | ... | <IngredientN> | <Result> Format 2 Code: <Result> | <Ingredient1> | <Ingredient2> | ... | <IngredientN> Format 3 Code: <Ingredient1> + <Ingredient2> + ... + <IngredientN> = <Result> Format 4 Code: <Result> = <Ingredient1> + <Ingredient2> + ... + <IngredientN> Or a different one? Wife says the best format is this one: Code: <Result> = <Ingredient1> | <Ingredient2> | ... | <IngredientN> RE: *** Recipe Updates *** - Taugeshtu - 06-04-2012 Listen to your wife I like 5 format the most RE: *** Recipe Updates *** - FakeTruth - 06-04-2012 Smart wife |