See ML4G
Use java -cp .\SrgMappingAnalyze-0.1.jar cn.enaium.sma.SrgMappingAnalyze
Input Srg Mapping
Input Proguard Mapping
Input Jar
Input refmap.json
repositories {
maven { url 'https://maven.enaium.cn/' }
}
dependencies {
annotationProcessor implementation('cn.enaium:SrgMappingAnalyze:0.3')
implementation('cn.enaium:SrgMappingAnalyze:0.3')
}
compileJava {
options.compilerArgs << "-Acn.enaium.sma.SrgMapping=srg_client.txt"
options.compilerArgs << "-Acn.enaium.sma.refmap=mixins.refmap.json"
}
Mixin
@ReMap("net.minecraft.client.Minecraft")
@Mixin(Minecraft.class)
public class MinecraftMixin {
@ReMap("run()V")
@Inject(at = @At("HEAD"), method = "run()V", remap = false)
public void run(CallbackInfo callbackInfo) {
}
}