Skip to content
This repository was archived by the owner on Jan 17, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 21 additions & 41 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,59 +1,35 @@
# DecompilerMC

---
**What is this for?**
This tool automatically decompiles and remaps specific Minecraft versions. (Specifically, it converts Mojang's mappings from their proguard format to the tsrg format. SpecialSource then uses that and remaps the client jar, which is then decompiled either with CFR (code only) or Fernflower (assets and code).)

This tool will help you convert mappings from mojang from their proguard format to the tsrg format that then can be used directly with specialsource which will then remap the client jar. Once that done it can be decompiled either with cfr (code only) or fernflower (assets and code).
Your output will be readable/executable code similar to ModCoderPack or other decompilers.

Of course we provide all that toolchain directly so your output will be readable (and soon executable) code as you could get with MCP (ModCoderPack)
## Prerequisites

---
**Important Note**
You will need
- an Internet connection to download the mappings. You can obviously put them in the respective folder if you have them physically.
- Windows, MacOS, or Linux.
- A Java runtime inside your path (Java 8 should be good).

You need an internet connection to download the mappings, you can ofc put them in the respective folder if you have them physically
You can run this directly with Python 3.7+ with `python3 main.py`. CFR decompilation takes approximately 60s and fernflower takes roughly 200s. The code will then be inside the folder called `./src/<name_version(option_hash)>/<side>`; you can find the jar and the version manifest in the `./versions/` directory.

We support Windows, MacOS and linux
The `./tmp/` directory can be removed without impact.

You need a java runtime inside your path (Java 8 should be good)

CFR decompilation is approximately 60s and fernflower takes roughly 200s, please give it time

You can run it directly with python 3.7+ with `python3 main.py`

You can find the jar and the version manifest in the `./versions/` directory

The code will then be inside the folder called `./src/<name_version(option_hash)>/<side>`

The `./tmp/` directory can be removed without impact

There is a common release here: https://github.com/hube12/DecompilerMC/releases/latest for all version
There is a common release here: https://github.com/hube12/DecompilerMC/releases/latest for all versions.

----

You can use arguments instead of terminal based choice, this is not required but once you pass a mcversion it will start the process

We recommend using -q everytime otherwise it might ask stdin questions.

By default we employ the nice guy strategy which is if the folder exist we create a new random one, please consider using -f,
if you actually need a specific path.

Examples:
- Decompile latest release without any output: `python3 main.py --mcv latest -q`
- Decompile latest snapshot server side with output: `python3 main.py --mcversion snap --side server`
- Decompile 1.14.4 client side with output and not automatic with forcing delete of old runs: `python3 main.py -mcv 1.14.4 -s client -na -f -rmap -rjar -dm -dj -dd -dec -q -c`

## Command-line Arguments (Optional)
You can use arguments instead of terminal-based choices. This is not required, but will automatically start if a mcversion is passed.

```bash

usage: main.py [-h] [--mcversion MCVERSION] [--side SIDE] [--clean] [--force]
[--forceno] [--decompiler DECOMPILER] [--nauto]
[--download_mapping DOWNLOAD_MAPPING]
[--remap_mapping [REMAP_MAPPING]]
[--download_jar [DOWNLOAD_JAR]] [--remap_jar [REMAP_JAR]]
[--delete_dep [DELETE_DEP]] [--decompile [DECOMPILE]] [--quiet]

Decompile Minecraft source code

optional arguments:
-h, --help show this help message and exit
--mcversion MCVERSION, -mcv MCVERSION
Expand All @@ -64,8 +40,8 @@ optional arguments:
--side SIDE, -s SIDE The side you want to decompile (either client or
server)
--clean, -c Clean old runs
--force, -f Force resolving conflict by replacing old files.
--forceno, -fn Force resolving conflict by creating new directories.
--force, -f Force resolve conflicts by replacing old files. (Use if a specific path is necessary)
--forceno, -fn Force resolve conflicts by creating new directories.
--decompiler DECOMPILER, -d DECOMPILER
Choose between fernflower and cfr.
--nauto, -na Choose between auto and manual mode.
Expand All @@ -81,13 +57,17 @@ optional arguments:
Delete the dependencies (only if auto off)
--decompile [DECOMPILE], -dec [DECOMPILE]
Decompile (only if auto off)
--quiet, -q Doesn't display the messages
--quiet, -q Doesn't display messages (recommended)
```

----
Examples:
- Decompile latest release without any output: `python3 main.py --mcv latest -q`
- Decompile latest snapshot server side with output: `python3 main.py --mcversion snap --side server`
- Decompile 1.14.4 client side with output and not automatic with forcing delete of old runs: `python3 main.py -mcv 1.14.4 -s client -na -f -rmap -rjar -dm -dj -dd -dec -q -c`

Build command (for executable):
----

To build as an executable, the commands are
```python
pip install pyinstaller
pyinstaller main.py --distpath build --onefile
Expand Down
Loading