-
-
Notifications
You must be signed in to change notification settings - Fork 273
Refactor how NeoForge version information is built into the jar #2751
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
Conversation
|
…emove ForgeSnapshot classes
0c37f20 to
5e200ba
Compare
|
@shartte, this PR introduces breaking changes.
|
Technici4n
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few minor comments
|
Another thing... Is the NeoForge version not already in the |
Because that requires a TOML parser and you also need the Minecraft/NeoForm version |
Which FML does have access to? Maybe we only need the MC and NeoForm versions in the properties file, and the NeoForge version can be read from the TOML. I think that the information duplication, even if it's small, is a bit suspicious. :P |
No, I don't like this. I need this during the startup phase in FML, and I really don't wanna start parsing mod toml files to get the NeoForge version AND have to load a properties file to get the MC/NeoForm versions as well. There's zero maintenance burden to expose the NF version this way. p.s.: What I can see is making the NeoForm version internal since that's a bit of an implementation detail, while the NeoForge/Minecraft versions are quite publicly facing. p.p.s.: another reason I'd not want to rely on neoforge.mods.toml is that it is not unique, while we can rely on net/neoforged/neoforge/common/version.properties being unique on the class-path. When FML starts and looks for this on the CP, it'll be a lot less of a problem. |
# Conflicts: # src/client/java/net/neoforged/neoforge/client/ClientHooks.java
|
🚀 This PR has been released as NeoForge version |
The goal of this PR is to include machine readable version information from our gradle build in the built NeoForge jar. Intent is to remove all command line options from FML for specifying versions since they can all be derived from the NeoForge jar file once this PR adds the necessary information to the jar. (Specifically based on the NeoForge version in use, which Minecraft version is required, and which NeoForm version)
Since it is related to versioning, this also resolves:
We may also want to include the commit hash / branch / potential build times in the version properties.
A generated
net/neoforged/neoforge/common/version.propertieslooks like this:A generated
net/neoforged/neoforge/common/NeoForgeVersion.javalooks like this: