Skip to content

Build: Set FMLModType: GAMELIBRARY in manifest#178

Merged
Johni0702 merged 1 commit intomasterfrom
feature/fmlmodtype
Apr 1, 2026
Merged

Build: Set FMLModType: GAMELIBRARY in manifest#178
Johni0702 merged 1 commit intomasterfrom
feature/fmlmodtype

Conversation

@Johni0702
Copy link
Copy Markdown
Contributor

This is necessary for (Neo)Forge to put Elementa in the correct ClassLoader (namely one with access to UniversalCraft and therefore indirectly Minecraft).

This should enable use of Elementa in Forge development environments and even via jar-in-jar on 26.1+ NeoForge.

Note: The attribute value required for this was changed from LIBRARY to GAMELIBRARY with ModLauncher 9 (Minecraft 1.17), so this won't work in a Forge for Minecraft 1.16 development environment. (see also SparkUniverse/UniversalCraft#104) Having it work on all versions would require we ship different jars for different versions, which I'd like to avoid.
This should not affect usage of Elementa in 1.16 Forge production environments, since jar-in-jar wasn't properly supported yet in 1.16, so you have to bundle and relocated Elementa into your main mod jar anyway, and as such it will be loaded on the correct ClassLoader (the same one as your mod).

This is necessary for (Neo)Forge to put Elementa in the correct
ClassLoader (namely one with access to UniversalCraft and therefore
indirectly Minecraft).

This should enable use of Elementa in Forge development environments and
even via jar-in-jar on 26.1+ NeoForge.

Note: The attribute value required for this was changed from `LIBRARY`
to `GAMELIBRARY` with ModLauncher 9 (Minecraft 1.17), so this won't work
in a Forge for Minecraft 1.16 development environment.
(see also SparkUniverse/UniversalCraft#104)
Having it work on all versions would require we ship different jars for
different versions, which I'd like to avoid.
This should not affect usage of Elementa in 1.16 Forge production
environments, since jar-in-jar wasn't properly supported yet in 1.16, so
you have to bundle and relocated Elementa into your main mod jar anyway,
and as such it will be loaded on the correct ClassLoader (the same one
as your mod).
@Johni0702 Johni0702 merged commit 27eb54f into master Apr 1, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants