Skip to content

Fallback to Class.forName when the serviceloader isn't working#801

Closed
quat1024 wants to merge 3 commits intoVazkiiMods:1.21.xfrom
quat1024:service-loader-duct-tape
Closed

Fallback to Class.forName when the serviceloader isn't working#801
quat1024 wants to merge 3 commits intoVazkiiMods:1.21.xfrom
quat1024:service-loader-duct-tape

Conversation

@quat1024
Copy link

@quat1024 quat1024 commented Apr 30, 2025

see #792, #795, #797, #800.

This is a really stupid fix, it's duct-tape, I just want the mod to stop crashing on people's computers. Nothing should ever break ServiceLoader.

Still logs an exception that the serviceloader failed. If Class.forName also somehow fails for both the fabric and forge classes, it will throw the exception.

@quat1024
Copy link
Author

quat1024 commented May 2, 2025

my boy has failed spotless, i forgot yall are actually ontop of the formatting in this repo lol. ok gimme a sec

@artemisSystem
Copy link
Member

code looks fine by me but i can't build it locally because the neoforge gradle plugin we're using seems to just not work on macos.

TheRealWormbo added a commit to TheRealWormbo/Patchouli that referenced this pull request Aug 2, 2025
artemisSystem pushed a commit that referenced this pull request Aug 2, 2025
Hopefully fixes #792, #795, and #797, superseding the workaround in PR #801.
@artemisSystem
Copy link
Member

Superseded by #818

@marchermans
Copy link

code looks fine by me but i can't build it locally because the neoforge gradle plugin we're using seems to just not work on macos.

Hello, as the maintainer of the plugin, I am interested to know what does not work. We have over 100 tests in NGs repository that all run and pass on MacOS at the moment, but I am sure I missed something. Could you provide me with more information?

@artemisSystem
Copy link
Member

@marchermans I think the issue is only on apple silicon. It tries to download lwjgl-freetype-3.3.3-natives-macos-patch.jar, but i think the correct file to get is lwjgl-freetype-3.3.3-natives-macos-arm64.jar.

> Task :NeoForge:neoFormApplyForgesAccessTransformer FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':NeoForge:neoFormApplyForgesAccessTransformer'.
> Could not resolve all files for configuration ':NeoForge:neoGradleInternalUnhandledNeoFormMinecraftDependenciesForneoFormJoined1.21-20240613.152323'.
   > Could not find lwjgl-freetype-3.3.3-natives-macos-patch.jar (org.lwjgl:lwjgl-freetype:3.3.3).
     Searched in the following locations:
         https://repo.maven.apache.org/maven2/org/lwjgl/lwjgl-freetype/3.3.3/lwjgl-freetype-3.3.3-natives-macos-patch.jar

quat1024 pushed a commit to quat1024/Patchouli that referenced this pull request Aug 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants