/SrgMappingAnalyze

Primary LanguageJavaApache License 2.0Apache-2.0

See ML4G

SrgMappingAnalyze

Use java -cp .\SrgMappingAnalyze-0.1.jar cn.enaium.sma.SrgMappingAnalyze

Features

Mapping key to value,value to key

Input Srg Mapping

Proguard mapping to Srg mapping

Input Proguard Mapping

DeObf jar

Input Jar

Mixin refmap update

Input refmap.json

Mixin refmap builder

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) {
    }
}