fabric-loader icon indicating copy to clipboard operation
fabric-loader copied to clipboard

Non-"intermediary" AccessWideners are Unsupported when no Intermediary is Present in Production

Open halotroop2288 opened this issue 1 year ago • 5 comments

When launching a Minecraft instance with no intermediaries (intended) with Fabric, and loading a mod mapped to the official namespace (AccessWidener included), the game will fail to launch.

Namespace (official) does not match current runtime namespace (intermediary)

This is the case for my mod that was built with Unimined. Loom apparently just marks all AccessWideners as "intermediary" whether they actually use intermediary or not.

Log

https://mclo.gs/5KfaIN3

halotroop2288 avatar Aug 18 '24 15:08 halotroop2288

Loader expects AWs to be in the target namespace: https://github.com/FabricMC/fabric-loader/blob/a2c52480db25121535b124e2997ce4490c58cef4/src/main/java/net/fabricmc/loader/impl/FabricLoaderImpl.java#L527

Knot presumes this is named in dev or intermediary out of dev: https://github.com/FabricMC/fabric-loader/blob/a2c52480db25121535b124e2997ce4490c58cef4/src/main/java/net/fabricmc/loader/impl/launch/knot/Knot.java#L258-L260

Loader only remaps AWs when in dev, and even then only from intermediary to the target namespace (i.e. Yarn).


official as a namespace is effectively a Minecraft specific invention; if you search for it, the only references are in MinecraftGameProvider and an old overload in GameProviderHelper, all in the context of remapping the original game jar. Regardless to whether your GameProvider remaps the game jar, the target namespace is taken as intermediary (out of dev).

Chocohead avatar Aug 18 '24 23:08 Chocohead

Soooo... call it what it is. dev or production

Cause development isn't always "named" and production isn't always intermediary. It seems like that is the only necessary distinction here.

halotroop2288 avatar Aug 19 '24 00:08 halotroop2288

if you remap the entire game to mojmap in production, and then try to load mods that are mapped to intermediary (the production output state), that will never work. there is a reason floader remaps the game to intermediary and loom remaps mods to intermediary at build time. if you are deviating from that to force some other mapping, you need to go all the way and remap everything not just the base game

Linguardium avatar Aug 19 '24 01:08 Linguardium

I think this is a valid issue, currently both loom and loader cheat a bit when intermediaries arent present as use intermediary as the namespace, this is mostly becuase the work to support this hasnt been done. All of the loader APIs should support this just fine.

modmuss50 avatar Aug 19 '24 07:08 modmuss50

Player has removed most of the hardcoding in his Loader Extension branch already: https://github.com/sfPlayer1/fabric-loader/commit/2e6e4eca4a68f9fd7c498c64c71b8e14ea76fa9e

NebelNidas avatar Aug 30 '24 20:08 NebelNidas