FabricMC / fabric-loom

Gradle build system plugin used to automate the setup of a minecraft mod development environment.
MIT License
242 stars 212 forks source link

Mixin mapping issue may related to #791 #804

Open SettingDust opened 1 year ago

SettingDust commented 1 year ago

Use https://github.com/SettingDust/fabric-kapt-issue as base project.

I add a mixin that is

@Mixin(ServerPlayNetworkHandler.class)
public class MixinTest {
    @Shadow public ServerPlayerEntity player;

    @Inject(method = "tick", at = @At(
            "HEAD"
    ))
    public void tick(CallbackInfo ci) {
        System.out.println(player.getUuid());
    }
}

Compiled with kapt in 1.0.17

@Shadow
public class_3222 player;

Compiled without kapt

@Shadow
public class_3222 field_14140;

There is an explanation from @zml2008

fwiw https://github.com/FabricMC/fabric-loom/pull/791 may give a hint as to the issue here there's possibly an overlap in the generated mappings files between the java and kotlin AP runs

Icosider commented 12 months ago

I join you, this error makes it very difficult to use mixins in a project with Kotlin and Ktor