md-5 / SpecialSource

Automatic generator and renamer of jar obfuscation mappings.
Other
202 stars 51 forks source link

Suggestion: Include instructions on how to use SpecialSource in the ReadMe file #75

Open DalekCraft2 opened 2 years ago

DalekCraft2 commented 2 years ago

Pretty self-explanatory. I want to include the libraries what Minecraft uses in the classpath of the decompiler so it produces less broken code, but I have no idea of where I learned to use this the first time, and this repository does not have any documentation.

LoneDev6 commented 2 years ago
java -cp $HOME/.m2/repository/net/md-5/SpecialSource/1.11.0/SpecialSource-1.11.0-shaded.jar:$HOME/.m2/repository/org/spigotmc/spigot/1.18-pre5-R0.1-SNAPSHOT/spigot-1.18-pre5-R0.1-SNAPSHOT-remapped-mojang.jar net.md_5.specialsource.SpecialSource --live -i $PLUGIN.jar -o $PLUGIN-obf.jar -m $HOME/.m2/repository/org/spigotmc/minecraft-server/1.18-pre5-R0.1-SNAPSHOT/minecraft-server-1.18-pre5-R0.1-SNAPSHOT-maps-mojang.txt --reverse
java -cp $HOME/.m2/repository/net/md-5/SpecialSource/1.11.0/SpecialSource-1.11.0-shaded.jar:$HOME/.m2/repository/org/spigotmc/spigot/1.18-pre5-R0.1-SNAPSHOT/spigot-1.18-pre5-R0.1-SNAPSHOT-remapped-obf.jar net.md_5.specialsource.SpecialSource --live -i $PLUGIN-obf.jar -o $PLUGIN.jar -m $HOME/.m2/repository/org/spigotmc/minecraft-server/1.18-pre5-R0.1-SNAPSHOT/minecraft-server-1.18-pre5-R0.1-SNAPSHOT-maps-spigot.csrg

https://www.spigotmc.org/threads/9-years-of-spigotmc-spigot-bungeecord-1-18-pre5.534760/

DalekCraft2 commented 2 years ago

I am actually decompiling the vanilla client jar, not the Spigot server.

md-5 commented 2 years ago

--help is reasonably comprehensive. Basics: in, out, map file. You can use --live to include the classpath.

LoneDev6 commented 2 years ago

I am actually decompiling the vanilla client jar, not the Spigot server.

It should work in the same way, you have an input jar + an input map -> an output jar. In the previous example md_5 runs the tool 2 times with two different maps (first with Mojang maps, then with Spigot maps)