architectury / architectury-plugin

A simple gradle plugin to enable developing multiplatform mods.
MIT License
56 stars 19 forks source link

Cannot run Forge 1.16.5 in dev env #45

Open ThexXTURBOXx opened 4 months ago

ThexXTURBOXx commented 4 months ago

I am currently trying to migrate a 1.16.5 mod to Architectury and for debugging, it would be very nice to be able to use the generated Architectury run configurations in IntelliJ. However, as soon as the Minecraft client gets to the main menu, it crashes. Here is my log: https://paste.ee/p/BBmj0 I am unsure what the exact cause of this issue is - probably either something that went wrong during transformation (in this case: sorry - I will reopen this issue in the architectury-transformer repo) or something inside the architectury-plugin went wrong. What I have tried so far: gradlew clean, gradlew --refresh-dependencies, invaliding caches in IntelliJ, completely deleting the .idea folder manually and reinitialising the project

Also, gradlew forge:runClient yields exactly the same error. I should also mention: I only tried with the Minecraft Client (Forge) configuration yet - there are some issues I want to resolve first before even attempting to start Fabric

Edit: I am using Architectury Loom 1.6 - maybe this could also be part of the issue

ThexXTURBOXx commented 4 months ago

Did some more experimenting and found out that this is indeed only an issue in my Forge module as Fabric works without any problems. Just for test purposes, I ran the genSources task to see what the decompiler says and this is the result: grafik

Indeed, as seen in the bottom right corner, func_227987_b_ is not remapped properly. I am using Parchment mappings as described in Architectury's documentation - maybe this is also part of the issue?

And there are even more occurrences in the same file which have not been remapped: grafik

ThexXTURBOXx commented 4 months ago

Finally found a fix: I used Forge 1.16.5-36.2.42 before, which is the latest version. However, I noticed that it is not the recommended version. Hence, downgrading to 1.16.5-36.2.34 fixed the problem. Looking at the changelog, I found the following two entries in 1.16.5-36.2.41:

Probably one of these caused the problem I ran into - however I won't bother trying out different versions for now. If someone else coincidentally runs into this very issue, just downgrade to the recommended version and you should be fine. I will leave this open for now. If someone wants to close this issue, feel free to do so.