Mixin icon indicating copy to clipboard operation
Mixin copied to clipboard

Overwrites are not 'unmapped' when using super-mixins

Open Aaron1011 opened this issue 7 years ago • 3 comments

Similar to https://github.com/SpongePowered/Mixin/issues/276, this issue occurs when using an obfuscated jar in a development environment. If a Mixin class extends another Mixin (i.e. super-mixins), any @Overwrite methods it contains will not be de-obfuscated at runtime.

Aaron1011 avatar Aug 01 '18 19:08 Aaron1011

I swear I tested this... Mixins are supposed to be unmapped in the context of their target so this should already be covered. I'll look into it anyway.

Mumfrey avatar Aug 02 '18 13:08 Mumfrey

As it is I don't see overwrites being unmapped at all. I thought it's an issue with transformer exclusions before, but apparently it isn't the case (well, it was but fixing that still doesn't fix this issue). And I need it because my main mod is a runtime dependency if a sub-mod.

After debugging it myself, I think it's because MixinPreProcessorStandard#attachSpecialMethod does "return false" when it's overwrite, without trying to remap it.

Niko-sk2x avatar Aug 25 '18 23:08 Niko-sk2x

~~I verified that removing this if() fixes that one issue with overwrites, but there are still some issues with remapping @Shadow fields, so I end up with this exception:~~

net.minecraft.util.ReportedException: Exception ticking world
	at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:835) ~[MinecraftServer.class:?]
	at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:741) ~[MinecraftServer.class:?]
	at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:192) ~[IntegratedServer.class:?]
	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:590) [MinecraftServer.class:?]
	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_171]
Caused by: java.lang.NoSuchFieldError: field_73005_l
	at net.minecraft.world.WorldServer.redirect$redirectProviderCanDoRainSnowIce$zzn000(WorldServer.java:1713) ~[WorldServer.class:?]
	at net.minecraft.world.WorldServer.updateBlocks(WorldServer.java:452) ~[WorldServer.class:?]
	at net.minecraft.world.WorldServer.tick(WorldServer.java:234) ~[WorldServer.class:?]
	at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:829) ~[MinecraftServer.class:?]
	... 4 more

The above actually causes other issues and most likely just makes it not error when it should.

Niko-sk2x avatar Sep 02 '18 13:09 Niko-sk2x