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

Add legacy id:meta to block state map #755

Merged
merged 2 commits into from
Aug 16, 2023

Conversation

Flonja
Copy link
Contributor

@Flonja Flonja commented Aug 14, 2023

This has been auto-generated.

@extremeheat
Copy link
Member

Where did your source this data from?

@extremeheat
Copy link
Member

extremeheat commented Aug 14, 2023

The schema is also not correct, it should be encapsulated inside a blocks object like the pc legacy.json. That will allow it to be added here https://github.com/PrismarineJS/node-minecraft-data/blob/master/index.js#L109 and used like doc in https://github.com/PrismarineJS/node-minecraft-data/blob/master/doc/api.md#minecraftdatalegacypcblocks

@Flonja
Copy link
Contributor Author

Flonja commented Aug 14, 2023

Where did your source this data from?

Good question, it's based on:
https://github.com/pmmp/BedrockBlockUpgradeSchema/blob/master/block_legacy_id_map.json

The schema is also not correct, it should be encapsulated inside a blocks object like the pc legacy.json.

Would that still be okay? I don't include the items part like the pc legacy.json.

@extremeheat
Copy link
Member

I don't include the items part like the pc legacy.json.

Yes, I mean you would need to fix that. I don't see how it makes sense to do special handling inside node-minecraft-data over just fixing the schema here to match the existing one.

The items section will be a future problem
@extremeheat
Copy link
Member

OK, and to be clear this is only mapping 1.2 (pre-flattening) -> and 1.3/1.4 (post-flattening) right?

@Flonja
Copy link
Contributor Author

Flonja commented Aug 15, 2023

I generated the data with 1.2 (id:meta) -> 1.18.10 mappings

@extremeheat extremeheat merged commit 6068208 into PrismarineJS:master Aug 16, 2023
@extremeheat
Copy link
Member

Merged, you can open an accompanying PR to node-minecraft-data to expose the new data by adding bedrock to here: https://github.com/PrismarineJS/node-minecraft-data/blob/master/index.js#L109

Additionally, we may need additional mapping here per PrismarineJS/prismarine-chunk#230 that blocks may have been renamed after flattening stringification in other versions. However, this can be investigated later on what the optimal way to handle this is.

@extremeheat
Copy link
Member

/makerelease

@rom1504bot rom1504bot mentioned this pull request Aug 19, 2023
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

Successfully merging this pull request may close these issues.

2 participants