Immersive Engineering

Immersive Engineering

134M Downloads

[1.16.5] Name Collision with Official Mappings

superckl opened this issue · 7 comments

commented

Description of the issue:

When attempting to remap Immersive Engineering to the official mappings for use in a development environment, there is a method naming collision that crashes the game. The method is setDirty() in IESavedData:
https://github.com/BluSunrize/ImmersiveEngineering/blob/1.16.5/src/main/java/blusunrize/immersiveengineering/common/IESaveData.java#L138-L142

Under Official mappings, the markDirty() method of WorldSavedData is called setDirty(), conflicting with the static method already present in IESavedData. Compability with the official mappings would require the static setDirty method be renamed.

Crashlog

This crash occurs when creating a new world:
https://gist.github.com/superckl/40588f608474325c5284f91086c94828

Versions & Modlist

IE: 1.16.5-5.0.0-pre.56 (the issue is still present on the default branch, as indicated above)
Forge: 1.16.5-36.1.0

commented

(I have taken the liberty of removing that moronic comment)

I don't believe we use those mappings atm (for good reason, as you can see) and we were planning to transition to them with 1.17, as far as I remember.

Correct me if I'm wrong here @malte0811, but I remember talking about it and agreeing on "wait for next major version"?

commented

Actually… how are you even getting it to load to that point? I just tried it, for me it always fails on our Mixins, and AFAIK there's no way around that for different mappings.

commented

Yeah I had some fun with that. Some people from the Forge Discord helped me out with one of the bot commands they have. They've implemented a few options to remap the mixins in dev:

How to use mods with mixin dependencies
If you want to use a mod as a dependency and it uses mixins, you will need to tweak your run configurations to be able to launch the game. Here's how:
1. Add these lines to your run configurations
You need to add 2 lines to BOTH your client {} and server {} run configuration blocks in your build.gradle. Copy these two lines and paste them somewhere within these two blocks. The order does not matter.
property 'mixin.env.remapRefMap', 'true'
property 'mixin.env.refMapRemappingFile', "${buildDir}/createSrgToMcp/output.srg"
2. Regenerate your run configurations
After adding these properties to your run configurations, you need to regenerate them for it to take effect. Run the Gradle task genIntellijRuns, genEclipseRuns, or genVSCodeRuns depending on your IDE of choice.
 
You should now be able to launch the game successfully.
commented

Fair warning: you should run both your full IDE setup and (no one mentions this) build before you add these.

commented

There is a way to remap the refmap. Quote from the Forge Discord:

If you want to use a mod as a dependency and it uses mixins, you will need to tweak your run configurations to be able to launch the game. Here's how:

  1. Add these lines to your run configurations. You need to add 2 lines to BOTH your client {} and server {} run configuration blocks in your build.gradle. Copy these two lines and paste them somewhere within these two blocks. The order does not matter.
property 'mixin.env.remapRefMap', 'true'
property 'mixin.env.refMapRemappingFile', \"${buildDir}/createSrgToMcp/output.srg\"
  1. Regenerate your run configurations. After adding these properties to your run configurations, you need to regenerate them for it to take effect. Run the Gradle task genIntellijRuns, genEclipseRuns, or genVSCodeRuns depending on your IDE of choice.
commented

Yes, we aren't going to use the official mappings until ForgeGradle supports full official mappings, rather than the absurd hybrid Forge decided to use for now. I assume this will be in 1.17. If it happens before I'd be happy to switch, but I don't expect that will be the case.

That is not relevant to this issue though. The OP is trying to run IE in a dev environment (think addon dev), but is using official mappings for the mod that dev environment is for. So FG needs to remap IE to official mappings (fg.deobf), which fails as they described. IMO this is a valid issue, I'll rename that method the next time I work on IE.

commented

Ah, fair enough!
I'll leave this to you then =)