Skip to content

[1.19] IllegalAccessError when LANGPROVIDER tries to access a module from its JarJar dependencies while loading mod #8878

@thedarkcolour

Description

@thedarkcolour

Minecraft Version: 1.19

Forge Version: 41.0.98

Logs: https://gist.github.com/thedarkcolour/3c08730917d49a8d1bf79334770b5c0a

Steps to Reproduce:

  1. Run Forge with just these two mods
  • KotlinForForge can be compiled from here. The correct jar is kotlinforforge-3.7.0-obf.jar, created in kfflang\build\libs
  • Examplemod can be compiled from here on the 1.19.x branch.
  1. Crash

Description of issue:
This issue happens when running with the vanilla Minecraft launcher. Attempting to load a mod with KotlinForForge (Kotlin language loader) causes an IllegalAccessError, since the kotlinforforge module cannot access kotlin.stdlib module, which is included via JarJar. The language provider classes are written in Kotlin, and they do not get loaded unless a mod whose modLoader is set to "kotlinforforge" in the mods.toml.
When KotlinForForge used the shadow plugin to shade the Kotlin libraries, this issue did not happen. It seems like JarJar is not opening up the module-info of the JarJar libraries?
image

Metadata

Metadata

Assignees

Labels

1.19BugThis request reports or fixes a new or existing bug.ConfirmedThis request has been verified to be factually correct by at least one member of the team.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions