A Minecraft deobfusctor / code generator
Generates deobfuscated code based on the emitted obfuscation files from mojang (since 19w36a) in 5 minutes
platform independent
no local installation of Minecraft required
- You can only use the generated code under mojang's license:
(c) 2019 Microsoft Corporation. All rights reserved. This information is provided "as-is" and you bear the risk of using it. This information does not provide you with any legal rights to any intellectual property in any Microsoft product. You may copy and use this information for your internal, reference purposes. Microsoft makes no warranties, express or implied, with respect to the information provided here.
- Recommended: 1.5-2 GB of RAM for the decompiler
Get the latest release
This project is designed for people that want to quickly take a look at a part of the code and understand what is going on.
This is very useful e.g.
- for quickly inspecting new versions
- if you find a bug and want to know what causes it
- if you are just interested in how things work π
No need to rely on someone else to release new mappings or versions.
The generated code is not perfect, but it's readable and that's what it's meant for.
The project trys to work as automated as possible.
So if mojang doesn't do any (breaking) changes, it should work a long time π¦
- Supported versions: 1.14.4 or
>=
19w36a (1.15+)
- Basic example for commandline/shell:
Aves.exe -v 1.14.4
Description: Creates source code for 1.14.4 (by default: client only)
.
ββββ javgent-standalone.jar # Deobfuscator β see https://github.com/BaseMC/javgent
ββββ avesflower.jar # Decompiler β see https://github.com/BaseMC/avesflower
ββββ jre # Embedded Java Runtime Environment β see https://adoptopenjdk.net/
ββββ logs # Generated log files (if enabled)
βββ¬β workingDir # Main Working Directory
ββββ version_manifest.json # Version Manifest (Lookup for all versions)
βββ¬β 1.14.4 # <version> Version Working Directory (here: 1.14.4)
βββ¬β raw # Raw files
β ββββ package.json # Version-Manifest (looked up from version_manifest.json)
β βββ¬β client # <variant> variant (here: client)
β βββ client.jar # Executable jar file (looked up from package.json)
βββ¬β mappings # Mapping files
β βββ¬β client
β βββ client.txt # Client-Mappings (looked up from package.json)
βββ¬β patch # Generated patch files
β βββ¬β client
β βββ *.json # PatchFiles (generated from mapping-file: client.txt)
βββ¬β deof # Deobfuscated files
β βββ¬β client
β βββ client.jar # Deobfuscated file (Obfuscated names, fixed stuff like: avm β Zombie)
βββ¬β dec # Decompiled files
β βββ¬β client
β βββ client.jar # Decompiled file; files are getting decompiled to human-readable form
βββ¬β output # human-readable Source-Code
βββ¬β client
βββ * # SourceFiles; unzipped disassmebled source.jar (client.jar)
π --help
Argument | Meaning | Example |
---|---|---|
-l --logfile |
logs additionally to a logfile generated under logs |
-l |
--version |
Shows the current Aves version and does nothing else | -version Example output: Aves 1.0.7364.40087 Format: <Name> <MainVersion>.<SubVersion>.<DaysSince2000>.<SecondsSinceMidnight/2> β see also |
--genconf <value> |
only generates a json-Config file value = JSON-Config file to generate |
--genconf config.json |
-c <value> --conf <value> |
load a json-Config file value = JSON-Config file (see below) |
-c config.json (uses a file called config.json for configuration) |
-v --mcversion |
Required (if using no json file for configuration) Version that should be downloaded |
-v "1.14.4" (generates files for 1.14.4) |
-j --java |
Path to java.exe (Java11+)default: path to included jre experimental: If not set, will be automatically searched in either the Environment-Variable %JAVA_HOME% (Windows) / $JAVA_HOME (Linux/Mac) or over the command where java (Windows, Linux, Mac) |
-j "C:\Program Files\Java\openjdk-11.0.2\bin\java.exe" |
-p --profiles |
Given profiles/variants, that should be used Overrides the Enabled -property in the json |
-p client server -p client |
To get more customizable profiles or templates you can use a json file as configuration.
If you want to generate a config file, use --genconf <Path> <optional:additionalParameters>
.
It's also possible to combine it with some parameters from above, e.g. -j
or -v
.
auto-generated file:
--genconf config.json
{
"ResolveOverNetwork": true,
"RemoteManifestJsonURL": "https://launchermeta.mojang.com/mc/game/version_manifest.json",
"SuppressManifestDownload": "00:05:00",
"ManifestJsonFilePath": "version_manifest.json",
"TryKeepExisting": true,
"NetworkIncludeClientLibs": false,
"NetworkIncludeLogging": false,
"Version": null, //this must be set by hand or calling the program next time with -v
"VersionSrcJson": "package.json",
"VariantConfigs": [
{
"Enabled": true,
"Name": "client",
"Key": "client",
"SrcJar": "client.jar",
"MappingKey": "client_mappings",
"MappingFile": "client.txt",
"PatchFile": "client.txt",
"ExcludedComponents": [
"net/minecraft/gametest/"
],
"DeObfuscatedFile": "client.jar",
"DecompiledFile": "client.jar",
"OutputFilesDirFolder": "client"
},
{
"Enabled": false,
"Name": "server",
"Key": "server",
"SrcJar": "server.jar",
"MappingKey": "server_mappings",
"MappingFile": "server.txt",
"PatchFile": "server.txt",
"ExcludedComponents": [
"net/minecraft/gametest/",
"com/google/",
"io/netty",
"it/unimi/",
"javax/",
"joptsimple/",
"org/apache"
],
"DeObfuscatedFile": "server.jar",
"DecompiledFile": "server.jar",
"OutputFilesDirFolder": "server"
}
],
"MakeJavaCompatible": true,
"JavaExePath": "jre\\bin\\java.exe",
"Deobfuscator": null,
"DeobfuscatorTimeout": "00:05:00",
"BaseDeobfuscatorCommand": "-jar \"{Deobfuscator}\" -s \"{SrcJar}\" -m \"{PatchFile}\" -o \"{DeObfuscatedFile}\"",
"Decompiler": null,
"DecompilerTimeout": "00:30:00",
"BaseDecompileCommand": "-jar \"{Decompiler}\" -dgs=1 -rsy=1 -lit=1 -mpm=60 \"{SrcFile}\" \"{TargetDir}\"",
"WorkingDirectory": "workingDir",
"VersionWorkingDirectory": null,
"RawDirectory": "raw",
"MappingFilesDir": "mappings",
"PatchFilesDir": "patch",
"DeObfuscatedDirectory": "deof",
"DecompiledDirectory": "dec",
"OutputDirectory": "output",
"OutputDirectoryMetaFiles": "output-meta",
"OutputDirLibs": "libs",
"OutputDirLogging": "logging"
}
If you also want to set server
to enabled (by default it isn't), use --genconf ... -p client server
π For more detailed description of the configuration options take a look at the documentation of the corresponding source files
You can also use a json-Configuration with some commandline arguments, e.g. if you like to use a different version.
Note that only the variants
in the .json
-file are used
Example using the json from above:
-c config.json -v 19w36a
Don't want to use the official releases?
Build the project yourself:
- Open a new commandline / shell in the repository-root
- Build the project
dotnet build
- Select the subfolder
Aves
(main project) and create an executable withdotnet publish -r <TargetedRuntime(OS)Identifier> -p:PublishSingleFile=true
- for the targeted
RuntimeIdentfier
see https://docs.microsoft.com/en-us/dotnet/core/rid-catalog - example for windows:
dotnet publish -r win10-x64 -p:PublishSingleFile=true
- for the targeted
- Go back into the root, select ADB and publish it
dotnet publish -c Release
- Copy the generated content (e.g.
ADB/bin/Debug/netcoreapp3.1/publish
) into thebuild
folder - Run
ADB.exe -r <TargetedRuntime(OS)Identifier> --bc <YourConfiguration(Release/Debug)>
Aves requires some external files, e.g. a JVM, a deobfuscator and a decompiler
- Build
ADB
with configurationDebug
(withRelease
it would need aGITHUB_TOKEN
) - Copy config-dev.json into your
ADB
build output folder (e.g.ADB/bin/Debug/netcoreapp3.1
) - Run in the
ADB
build output folder:ADB.exe -c config-dev.json -r <yourSystemRID>
- You can get the corresponding RID here
Most common:win-x64
Windows 64bitlinux-x64
Linux 64bitosx-x64
Mac OS X 64bit
- You can get the corresponding RID here
- Copy all files from the generated
dev
folder directly into yourAves
build output folder (e.g.Aves/bin/Debug/netcoreapp3.1
)
- The files are usually kept until a (forced) rebuild is carried out
- You should update this files regularly