-
-
Notifications
You must be signed in to change notification settings - Fork 187
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
[1.21] Move extensible enums to data-driven enum extension #1016
[1.21] Move extensible enums to data-driven enum extension #1016
Conversation
Last commit published: c90de71609704333bb3ee03ebc0e6c218d58399c. PR PublishingThe artifacts published by this PR:
Repository DeclarationIn order to use the artifacts published by the PR, add the following repository to your buildscript: repositories {
maven {
name 'Maven for PR #1016' // https://github.com/neoforged/NeoForge/pull/1016
url 'https://prmaven.neoforged.net/NeoForge/pr1016'
content {
includeModule('net.neoforged', 'neoforge')
includeModule('net.neoforged', 'testframework')
}
}
} MDK installationIn order to setup a MDK using the latest PR version, run the following commands in a terminal. mkdir NeoForge-pr1016
cd NeoForge-pr1016
curl -L https://prmaven.neoforged.net/NeoForge/pr1016/net/neoforged/neoforge/21.0.11-beta-pr-1016-datadriven_enum_extension/mdk-pr1016.zip -o mdk.zip
jar xf mdk.zip
rm mdk.zip || del mdk.zip To test a production environment, you can download the installer from here. |
432cb6a
to
7417877
Compare
0e84d40
to
a8de3e1
Compare
0b79e0d
to
c90de71
Compare
This PR switches all enums which NeoForge makes extensible to the data-driven approach implemented in neoforged/FancyModLoader#148 and. See the linked FML PR for the motivation behind this change.
Together with the changes proposed in #970 this allows removing most of the patches on these enums as lazy initialization of the data structures,
Codec
s andStreamCodec
s to capture values added later is no longer necessary and the ordering guarantee provided by the reworked enum extension combined with the match check implemented by #970 also means that sending these enums over the network as integers is safe.