Giter VIP home page Giter VIP logo

tq-xyy / decompilermc Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hube12/decompilermc

0.0 0.0 0.0 6.28 MB

This repository allows you to decompile any minecraft version that was published after 19w36a without any 3rd party mappings, you just need to execute the script or the executable (see releases)! Thanks mojang to have published proguard mappings

License: Other

Python 100.00%

decompilermc's Introduction

DecompilerMC


What is this for?

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).

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)


Important Note

You need an internet connection to download the mappings, you can ofc put them in the respective folder if you have them physically

We support Windows, MacOS and linux

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

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


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
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
                        The version you want to decompile (all versions
                        starting from 19w36a (snapshot) and 1.14.4 (releases))
                        Use 'snap' for latest snapshot (20w48a for example, it will get it automatically) or 'latest'
                        for latest version (1.16.4 for example, it will get it automatically)
  --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.
  --decompiler DECOMPILER, -d DECOMPILER
                        Choose between fernflower and cfr.
  --nauto, -na          Choose between auto and manual mode.
  --download_mapping DOWNLOAD_MAPPING, -dm DOWNLOAD_MAPPING
                        Download the mappings (only if auto off)
  --remap_mapping [REMAP_MAPPING], -rmap [REMAP_MAPPING]
                        Remap the mappings to tsrg (only if auto off)
  --download_jar [DOWNLOAD_JAR], -dj [DOWNLOAD_JAR]
                        Download the jar (only if auto off)
  --remap_jar [REMAP_JAR], -rjar [REMAP_JAR]
                        Remap the jar (only if auto off)
  --delete_dep [DELETE_DEP], -dd [DELETE_DEP]
                        Delete the dependencies (only if auto off)
  --decompile [DECOMPILE], -dec [DECOMPILE]
                        Decompile (only if auto off)
  --quiet, -q           Doesn't display the messages

Build command (for executable):

pip install pyinstaller
pyinstaller main.py --distpath build --onefile

decompilermc's People

Contributors

hube12 avatar duchghast avatar earthcomputer avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.