hube12 / DecompilerMC

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Compiler seems to be inlining all static constants

hornta opened this issue · comments

I have not found a single static constant used in the classes. Is it a compiler issue?

Here is an example of what such a constant could look like. I searched across the whole project for this but I have not found anything. It's from the 1.17.1 client.

public static final float DEFAULT_BB_HEIGHT = 1.8f;

According to this page there is an CLI option to turn it off --relinkconststring false According to the documentation it does its best to recover the static final and doesn't work when there are multiple public static const but this should make it a bit easier to at least debug the minecraft jars.

commented

Since a few snapshots (1.17), mojang shipped all its constants, debugging as well as some class that were previously removed by proguard, by extension we got name of some of the "magic" constants used accross the code base. However java when compiling will replace all constants with their value so a compiler will always have to trace back and try to associate them. We can for sure activate that option but since it's a feature by mojang to share constants name, I don't think I will enable it globally (probably a flag)