Closed ThexXTURBOXx closed 5 months ago
Thanks for the PR, but this functionality is already available for Neo, just without this API. I intentionally excluded it from #166. (See the #loom-dev discussion on this)
The design is problematic since it uses unreliable code[^1] for determining the relative AW file paths. It also should not be a Property<Boolean>
IMO, just a toggle method like java.withSourcesJar()
etc.
You can just add the AW names directly to remapJar.atAccessWideners
:
https://github.com/architectury/architectury-loom/blob/8da7cc0f877ff572e7701ad6d63f5d171b328173/src/main/java/net/fabricmc/loom/task/RemapJarTask.java#L113-L122
[^1]: This breaks if the AW is inside a subdirectory of something that's not directly in this project's resources, such as a common AW. I also can't change/remove this behaviour without making a breaking change.
Oh, I am terribly sorry - I didn't know that it "moved" for NeoForge! That one works without further tinkering just fine, so I will use this for the future :) Again, I am very sorry - I will close this PR then!
No problem. FYI the more direct API on RemapJarTask
also works on Forge – people can use the same API on both platforms for consistency if they want to.
Just a simple, but very effective change - works fine in my tests