Skip to main content

Non-Minecraft Dependencies

Non-Minecraft dependencies are artifacts that are neither a mod nor a dependency Minecraft or NeoForge itself relies on. By default, NeoForge does not load non-Minecraft dependencies when loading a mod. For development environments, they must be added as a runtime dependencies, while production environments should make use of the jar-in-jar system.

For example, you can add the com.example:example library to all runs like so:

dependencies {
// This is still required to add the library at compile time
implementation 'com.example:example:1.0'
// This adds the library to all the runs
additionalRuntimeClasspath 'com.example:example:1.0'
}
tip

If you instead only want to add a runtime dependency to one specific run:

dependencies {
implementation 'com.example:example:1.0'
// Only add dependency for the client run
clientAdditionalRuntimeClasspath 'com.example:example:1.0'
}