Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New recipe format #3

Closed
5 of 6 tasks
rom1504 opened this issue Mar 24, 2015 · 26 comments
Closed
5 of 6 tasks

New recipe format #3

rom1504 opened this issue Mar 24, 2015 · 26 comments

Comments

@rom1504
Copy link
Member

rom1504 commented Mar 24, 2015

Some cases are not handled by the recipes format, in particular a lot of thing related to metadata.
See https://github.com/PrismarineJS/minecraft-data/wiki/Recipe-format vs https://github.com/PrismarineJS/minecraft-data/wiki/Proposed-new-recipe-format
What should be done :

  • finish defining the new format
    • check it handles all cases
    • check it isn't too ugly
  • see how it would be implemented in mineflayer
  • update the wiki extractor scripts
  • update the resulting recipes.json file

Might also be related to PrismarineJS/mineflayer#222

It might also be a good idea to define a jsonformat for this ( see #2 ) if it's not too complicated.

@Gjum
Copy link
Member

Gjum commented Mar 24, 2015

check it isn't too ugly

Any ideas how to do this?

@rom1504
Copy link
Member Author

rom1504 commented Mar 24, 2015

I think trying to apply the new format to several recipes in recipes.json might give a good idea if the format is good. For example :

  • some recipes that are correctly handled by the old format : see if they stay readable
    • recipes with inShape
    • recipes with ingredients
    • recipes with outShape
  • some recipes that are not handled by the old format

@Gjum
Copy link
Member

Gjum commented Mar 24, 2015

Hm, I tried to do that with the example at the bottom.
Updated it with a 1x1 and 1x2 shape.

Also writing the spock implementation now, nearly done.

@rom1504
Copy link
Member Author

rom1504 commented Mar 24, 2015

Oh yeah right. Looks good.
I'm not sure about one thing though :
is

{ // Polished Granite
            "result": {"id": 1, "meta": 2, "amount": 4},
            "inShape": [
                [[1,1], [1,1]],
                [[1,1], [1,1]]
            ]
        },

better or :

{ // Polished Granite
            "result": {"id": 1, "meta": 2, "amount": 4},
            "inShape": [
                [{"id":1, "meta":1}, {"id":1, "meta":1}],
                [{"id":1, "meta":1}, {"id":1, "meta":1}],
            ]
        },

the array is a bit confusing I think (since we also have array of ids in that file)

@roblabla
Copy link
Member

I prefer the first one, personally.

@Gjum
Copy link
Member

Gjum commented Mar 24, 2015

First one is shorter and more human-friendly, although support for both is trivial.

@rom1504
Copy link
Member Author

rom1504 commented Mar 24, 2015

Ok let's keep the first one then.

@Kupferhirn
Copy link

what about repairing a tools?
http://minecraft.gamepedia.com/Repair

@Gjum
Copy link
Member

Gjum commented Mar 24, 2015

Not sure if that should be included, as an entry per tool and damage value would be the only way with the current format.
I think handling this on a higher level would be better, as this can be easily expressed in code, but not in data.

@rom1504
Copy link
Member Author

rom1504 commented Mar 24, 2015

Yeah I don't think this is a recipe. It's not crafting either.

The "recipe" is even simple to figure out ("Two items of the same type and material can be placed anywhere on the crafting grid, and the result is a single repaired item").

Maybe the data in the tables in that Repair page would be useful for the implementation but that would be in a different .json.

@Gjum
Copy link
Member

Gjum commented Mar 24, 2015

Python utils for Spock: Done!
Feel free to modify for mineflayer.

@Gjum
Copy link
Member

Gjum commented Mar 24, 2015

I'm thinking about building a converter from old to new format, just for testing, as long as the wiki scripts are not ready.

@Gjum
Copy link
Member

Gjum commented Mar 24, 2015

Converter done! See #4

@rom1504
Copy link
Member Author

rom1504 commented Mar 24, 2015

Ok, I've done a schema for the old recipes format, I'm going to do one for the new schema too I think.

@rom1504
Copy link
Member Author

rom1504 commented Mar 25, 2015

The schema for the new recipe format is done, see http://prismarinejs.github.io/minecraft-data/

@rom1504
Copy link
Member Author

rom1504 commented Mar 25, 2015

I added a link to the README to the wiki page of the new recipe format.

I wonder if that page should stay in the wiki or be added as a .md file in the doc/ folder ?

@Gjum
Copy link
Member

Gjum commented Mar 25, 2015

For documents that won't change often, doc/*.md is better than wiki IMO. I only use the wiki when drafting.

@roblabla
Copy link
Member

👍 for doc/*.md. Wiki is cool for quick collaboration, but it quickly becomes hard to navigate;

@rom1504
Copy link
Member Author

rom1504 commented Mar 26, 2015

Ok I'll put it there, once I checked everything is ok with the format by doing the last two points (implementing in mineflayer and updating my wiki extractors scripts)

@rom1504
Copy link
Member Author

rom1504 commented Mar 26, 2015

Implemented in mineflayer. Now the only thing remaining here is updating the wiki scripts.

@rom1504
Copy link
Member Author

rom1504 commented Mar 27, 2015

Ok, problem :
we don't have the "Smooth Granite" --> [1,1] data anywhere, I can't update the recipe without that info.

I think we're going to need to scrape the wiki in the end

@Gjum
Copy link
Member

Gjum commented Mar 27, 2015

Is it really called Smooth Granite and not Polished?

@rom1504
Copy link
Member Author

rom1504 commented Mar 27, 2015

Yeah I think it's Polished Granite, my confusion came from there https://github.com/PrismarineJS/minecraft-data/wiki/Proposed-new-recipe-format#metadata-in-the-shapes

@rom1504
Copy link
Member Author

rom1504 commented Mar 27, 2015

So, the last step of that issue depends on #7 and then on #8 . it won't be closed very soon.

@Gjum
Copy link
Member

Gjum commented Mar 27, 2015

We are using the new recipe format now, and the remaining problems are all covered with issues. So this can actually be closed.

@rom1504
Copy link
Member Author

rom1504 commented Mar 27, 2015

Yeah you're right.

@rom1504 rom1504 closed this as completed Mar 27, 2015
roblabla added a commit that referenced this issue Sep 2, 2015
change structure of the protocol : types and states
IceTank pushed a commit to IceTank/minecraft-data that referenced this issue Mar 27, 2024
This may not be strictly necessary, in either case Forge server with
-Dfml.debugNetworkHandshake=true logs:
[14:26:03] [Netty Server IO PrismarineJS#3/INFO] [FML]: Client protocol version 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants