By default, Minecraft Forge does not load dependencies from the classpath unless they are explicitly declared as mods. These steps outline how to remedy this. This guide assumes that:
- You are on ForgeGradle 5 or higher.
- You are on Forge 1.17.1 (37.0.13) or higher.
To configure your Java libraries to be loaded by Forge, you should use the minecraftLibrary
configuration provided by ForgeGradle.
You now must make sure to declare your dependencies using minecraftLibrary
configuration.