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

feat: Extract proper registry data from vanilla datapack #195

Merged
merged 1 commit into from
Jun 27, 2024

Commits on Jun 27, 2024

  1. feat: Extract proper registry data from vanilla datapack

    Finally, the entire world is a plains biome!
    
    Jokes aside, what this patch does is as follows: It expands the amount
    of data extracted from the official server to include the vanilla
    datapack registries, and adds code to parse them at run-time from the
    file system. This means the application now has a much better
    understanding of the knowledge shared by both the server and client.
    
    For instance, when upgrading to a new version of Minecraft, I would
    previously have to capture the flow of Registry Data packets from a
    real server, which CobolCraft would then re-play as a blob. Any data
    within that packet, such as biome IDs or chat message types, would
    need to be hard-coded where they were needed, since the server-side
    aspects of the data would simply be missing.
    
    Now, with the "--server" flag added in the Makefile, JSON files are
    exported for every vanilla registry entry. Using newly-implemented
    C++ routines to obtain directory listings (why is this not part of
    GnuCOBOL?), the registries can be filled in at run-time. The Registry
    Data packet now sends the actual data instead of an opaque blob.
    
    As a proof-of-concept, the new methods are used to lookup the
    "minecraft:plains" biome at chunk allocation such that we get a much
    nicer tint of the environment (compared to "minecraft:badlands", which
    happened to be the default ID 0 when using the blob).
    meyfa committed Jun 27, 2024
    Configuration menu
    Copy the full SHA
    c7da791 View commit details
    Browse the repository at this point in the history