Skip to content
This repository has been archived by the owner on Feb 18, 2021. It is now read-only.

Flattening data #1

Open
caelunshun opened this issue Mar 10, 2020 · 4 comments
Open

Flattening data #1

caelunshun opened this issue Mar 10, 2020 · 4 comments

Comments

@caelunshun
Copy link
Member

https://bugs.mojang.com/secure/attachment/151784/the_flattening.txt

Should be able to parse this and generate mappings.

@Defman
Copy link
Member

Defman commented Mar 10, 2020

Would it not be better to parse the block report which the Minecraft jar is able to generate?

@Defman
Copy link
Member

Defman commented Mar 10, 2020

I might be wrong, but are the intent to generate block enum or similar? or is this a reference to issue?
Parsing the blocks.json file and generating code at build time via build.rs would be rather easy.

  1. Download minecraft_server.jar.
  2. Run the generator to create blocks.json.
  3. Parse blocks.json at build time via build.rs if the file has changed.
  4. Include the generated code via the include macro.

@caelunshun
Copy link
Member Author

The block report only exists for 1.13 and up, but my desire is to support versions prior to 1.13 as well. I just left this here in case it might be of some use at some point.

@Defman
Copy link
Member

Defman commented Mar 10, 2020

Ahh, that makes sense. Currently, the generation of code is done on byte encoded versions of the JSON file (version.dat)? I would love to make it so that the build.rs downloads the server jar for a given version and generates the block, items, achievements and etc; and then include them in a lib via the include macro. This might be preferred since Mojang have the all do not distribute.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants