Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems with fabric mod remap with 1.5 loom (in prod) #194

Open
dima-dencep opened this issue Jan 26, 2024 · 8 comments
Open

Problems with fabric mod remap with 1.5 loom (in prod) #194

dima-dencep opened this issue Jan 26, 2024 · 8 comments
Labels
bug Something isn't working Fabric This issue is specific to the Fabric platform. priority: high This needs to be worked on and reviewed ASAP

Comments

@dima-dencep
Copy link

java.lang.NoSuchFieldError: currentScreen
	at net.minecraft.class_425.handler$zmk000$rrls$init(class_425.java:558)
	at net.minecraft.class_425.<init>(class_425.java:75)
	at net.minecraft.class_310.<init>(class_310.java:704)
	at net.minecraft.client.main.Main.main(Main.java:223)
	at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:470)
	at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74)
	at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23)

everything was working yesterday, today I opened the project and lo and behold...

@gniftygnome
Copy link

I'm pretty sure I've got the same problem, but in my case it came about as soon as I upgraded to Loom 1.5.

@gniftygnome
Copy link

It seems like my forum post is going to slip through the cracks so I'm going to duplicate it here in case that's more likely to be seen.


I'm trying to test 24w06a (which requires arch loom 1.5). I disabled Forge and NeoForge, since they are slowlike. My Fabric build succeeds, but the resulting jar crashes [edit: only in prod, not in dev] with method not found errors. If I remove the offending mixin or call, it just moves on to another. It seems to me like the jar is not remapped correctly.

This project uses Yarn mappings.

Possibly of note (?) is that I cannot seem to set loom.mixin.useLegacyMixinAp = false; no matter where I configure it, I get the dreaded You need to set useLegacyMixinAp = true to configure Mixin annotation processor. error.

Here's a few examples of the errors method missing errors:

java.lang.NoSuchMethodError: 'net.minecraft.class_6544$class_6546 net.minecraft.class_6544$class_6546.of(float, float)'

java.lang.NoSuchMethodError: 'com.mojang.brigadier.builder.LiteralArgumentBuilder net.minecraft.class_2170.literal(java.lang.String)'

java.lang.NoSuchMethodError: 'net.minecraft.class_1966 net.minecraft.class_2794.getBiomeSource()'

In case you would like to see the gradle configuration, it is the same as the 1.20.4 version was (aside from upgrading arch loom, foojay-resolver-convention, fabric, and minecraft.
https://github.com/TerraformersMC/Biolith

If there are some logs or a specific area of my config or whatever that I can provide to help clarify, just let me know. I have tried so many things at this point to no avail. But this feels like something where somebody familiar with Loom or remapper internals might just know what is wrong.

@shedaniel shedaniel added the priority: high This needs to be worked on and reviewed ASAP label Feb 11, 2024
@wagyourtail
Copy link

possibly related to FabricMC#1044

@gniftygnome
Copy link

Further information (from my discord dev-support thread):

(1) I've updated the main branch of Biolith on GH to the version which successfully builds a faulty Fabric jar. All the deps including arch loom are at their latest versions as of today. This still fails in prod (seemingly because things aren't fully remapped) and works in dev. https://github.com/TerraformersMC/Biolith

(2) A further data point: I slammed the common and fabric modules back together, ripped out architectury loom, and used the latest fabric loom 1.5, and this gives a build that works in prod. This seems to incriminate arch loom specifically. (If for some reason you want to see the source for this, let me know and I can upload it. Otherwise I won't because it's not my preferred way forward. I'd like much more for arch loom to work.)

@shedaniel shedaniel added bug Something isn't working Fabric This issue is specific to the Fabric platform. labels Feb 20, 2024
@gniftygnome
Copy link

In my case, this was caused by having fabric.loom.multiProjectOptimisation=true in gradle.properties. This worked in prior versions of Loom, but something has changed in Loom 1.5 and now it can easily cause remapping issues. As I understand it, there is now a hard requirement for all remapping to occur during the top-level project build task when using MPO. I suspect that is not the case for arch loom projects. If I am correct about that, arch loom users should avoid enabling MPO.

@qyl27
Copy link

qyl27 commented Jun 17, 2024

Same issue but it happened recently.
In arch loom 1.6, it still exists.

@Jab125
Copy link
Member

Jab125 commented Jun 17, 2024

Same issue but it happened recently. In arch loom 1.6, it still exists.

is fabric.loom.multiProjectOptimisation set to true?

@qyl27
Copy link

qyl27 commented Jun 17, 2024

Same issue but it happened recently. In arch loom 1.6, it still exists.

is fabric.loom.multiProjectOptimisation set to true?

ah, yes, I have followed the issue in fabric loom repo to fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Fabric This issue is specific to the Fabric platform. priority: high This needs to be worked on and reviewed ASAP
Projects
None yet
Development

No branches or pull requests

6 participants