architectury / architectury-loom

A Gradle plugin to setup environments for Fabric, Forge, NeoForge and Quilt modding.
https://docs.architectury.dev/loom/introduction
MIT License
115 stars 41 forks source link

[Feature Request] Patch Forge ModLoader or Loom in Forge mode to dynamically remap Forge mods #222

Open Ampflower opened 5 months ago

Ampflower commented 5 months ago

Simply, have Forge remap to the actual dev mappings when remapping mods/. For 1.20.6+, this is only relevant for when dev isn't set to Mojmap. If Forge has no supporting code for it in the loader, it might be viable to provide an alternate method via Loom instead.

Why?

The mods folder is a good spot for quickly tossing in a mod to test or debug with without actually pulling it in as a dependency, which is non-trivial when the mod in question isn't on standard platforms.

Results:

I have tried to dump EMI for 1.20.1 in, and noticed that when it failed, it seems Forge remapped it to Mojmap; tho that might've just been more so due to modern Forge having classes be in named when compiled. I'm not sure how viable or reliable such a patch would be, if there is a spot to hook in.

Considerations:

Using the already existent mod* functions in Gradle; which work but isn't as convenient for one-offs of "does this work by chance?", particularly when the mod isn't on a maven. This isn't intended to be a mean of development; merely act as if modRuntime was applied.

Other:

Architectury Loom: 1.6.397 Minecraft 1.20.1 Forge: 1.20.1-47.2.0 Yarn: 1.20.1+build.10

Xplat setup with Arch API absent; Loom is solely used for remapping and running 'Common' and Forge.