-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Extract proper registry data from vanilla datapack (#195)
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).
- Loading branch information
Showing
13 changed files
with
430 additions
and
271 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.