06-03-2012, 08:42 PM
*** Recipe Updates ***
|
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
06-03-2012, 09:03 PM
I was proposing a new format to replace the current recipes.txt format:
https://forum.cuberite.org/showthread.ph...96#pid3096
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:
06-04-2012, 02:54 AM
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
06-04-2012, 05:16 AM
I'm leaving on a school trip tomorrow, so i wont be able to work on the recipes until Thursday.
See you later.
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
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>
06-04-2012, 07:00 AM
Listen to your wife I like 5 format the most
06-04-2012, 07:40 AM
Smart wife
|
« Next Oldest | Next Newest »
|
Users browsing this thread: 6 Guest(s)