-
-
Notifications
You must be signed in to change notification settings - Fork 183
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
Inject interfaces to vanilla classes using JST #1765
Inject interfaces to vanilla classes using JST #1765
Conversation
Last commit published: d9954e16f76bec28facdabb939d6b316d60c83f7. 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 #1765' // https://github.com/neoforged/NeoForge/pull/1765
url 'https://prmaven.neoforged.net/NeoForge/pr1765'
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-pr1765
cd NeoForge-pr1765
curl -L https://prmaven.neoforged.net/NeoForge/pr1765/net/neoforged/neoforge/21.4.42-beta-pr-1765-jst-interface-injection/mdk-pr1765.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. |
buildSrc/src/main/java/net/neoforged/neodev/ApplyJSTTransformer.java
Outdated
Show resolved
Hide resolved
@Matyrobbrt, this pull request has conflicts, please resolve them for this PR to move forward. |
How much has this been tested on the individual downstream platforms? |
As much as the game launching (which also verifies that recomp is successful, therefore proving the patches are correct as otherwise there would be compilation errors due to missing interfaces and methods). This PR has little to no effect in userdev as the second set of patches hides the use of interface injection from any toolchain. |
So in userdev this uses Patches? Instead of II? |
Yes exactly. See the |
IMHO that is a lucky break, but not a great solution........ regardless, carry on, my curiosity has been satistied |
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.
Looks good! Final request: can you sort the injected interfaces file in a sensible way?
Done. I sorted them alphabetically, splitting enum extensions from the others |
🚀 This PR has been released as NeoForge version |
This PR replaces patches with the purpose of adding interfaces to vanilla classes with a JST step. This removes another annoyance when porting as there will not be rejects caused by changes to the vanilla interfaces of classes.
To not affect userdev, we're now generating a second set of patches that will be published and that are based on the vanilla sources without interfaces, unlike the in-repo patches which are based on interface-injected sources.