Upgrade to 1.16 + big refactor + initial plugin API#307
Merged
caelunshun merged 85 commits intodevelopfrom Feb 27, 2021
Merged
Conversation
This is going to be a major change in how the crate structure is organized. I'll explain more about this in future commits, once the refactor begins to take shape.
This crate generates a bunch of code from a variety of sources. It's intended to replace `feather-definitions` and `feather-data`, to some extent.
I switched from Legion to hecs because: * Legion's API is generally verbose and difficult to use in cases it wasn't built for. * Legion brings on unnecessary functionality, such as its systems scheduler, which is bad impact on compile times. * Legion doesn't support proper change detection. (Hecs doesn't either, but right now I'm using Bevy's fork of it, which has change detection in first-class.)
This ports the block code generator to 1.16 and the new crate layout. I've changed it to ingest data from the Vanilla data report outputted according to https://wiki.vg/Data_Generators. Instead of taking data from feather-data, the generator now expects the blocks report to have been manually generated in the current directory. The benefit of this is that feather-data can be removed from the build process. I know many had problems with the JDK and rustfmt requirements, so this simplifies things nicely. Block code is no longer automatically generated at build time; now creating it must be done manually. That said, it's cached in Git, so regenerating code is only necessary when we upgrade to a new version. This commit only ports the generator. What still needs to be done: * Block categories, wall_blocks, directions * SimplifiedBlockKind
This ports SimplifiedBlockKind to `feather-generated`, the successor to `feather-definition`s.
feather-datapacks will replace feather-data as a solution for loot tables and recipes. We download the vanilla JAR at startup, then extract the vanilla datapack for access to whatever assets we need.
Looks like some IDs changed between 1.16.1 and 1.16.2.
This implements the initial plugin API. The code is rough in some areas, especially the query code. There is some unsafe magic that needs reviewing and cleaning up. But so far, the code seems to work.
Member
Author
|
I've just pushed an initial implementation of the barebones plugin API. As this is becoming a colossal PR, I'm going to merge it in a few days, if nobody has objections. I think it's time we moved development back to the main branch :) |
Member
Author
|
Finally time to merge this! Some features were lost in the rewrite, so I've moved the old code from before this PR into the |
This was referenced Mar 1, 2021
Closed
Closed
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Upgrades the codebase to support
1.16.21.16.31.16.5 as the sole supported version.Also, this PR includes a substantial refactor in terms of the crate structure. I'll elaborate more on this as the refactor progresses.
(Not even close to finished!)
Key changes (planned, not all implemented yet):
feather-protocolas the successor tofeather-network.feather-generatedcrate for protocol IDs and data (this crate replacesfeather-dataandfeather-definitions)anyhow::Resultwhich can be anErrvariant when an internal error occurs (e.g. an entity is missing a component, or a resource is not present.) Systems should no longer useunwraporpanicin most cases.feather-commoncrate.feather-servernow only contains systems needed to send and receive packets. All gameplay functionality is implemented infeather-common.Add a new, experimental dynamic linking workflow that could help iteration times during development.Resolves #220.
Resolves #270.