Hexeption / MCP-Reborn

MCP-Reborn is an MCP (Mod Coder Pack) for Minecraft for making modded clients and researching its code. (1.13-1.20.1)
Other
1.01k stars 134 forks source link

Code is still obfuscated (I think) #166

Open wimur opened 2 years ago

wimur commented 2 years ago

Going through the code there are these p_xxxxx values everywhere making it unreadable. Followed the directions exactly, at least I think I did.

Looked at the mappings zip folder and those values (they start with "f" and "m") don't match the ones showing up, so maybe something's different with 1.18?

No idea. Anyone got an idea of what's going on here? Or how to make the code readable?

Monmcgt commented 2 years ago

It's unob (class name, method name, package) but field and param are not fully unob not 100% sure you can correct me if I'm wrong

TheKodeToad commented 2 years ago

If you are using official mappings, no parameter names are deobfuscated. The method and field names should be, though. There is a project named Parchment that aims to add missing parameters.

If you are using MCP mappings, it is provided by Forge.

They cannot deobfuscate everything as Minecraft is quite a complex game [citation needed].

pete-the-dev commented 2 years ago

Can't you just ask Mojang for the full mappings?

TheKodeToad commented 2 years ago

I don't think it's (ever) as simple as giving one of the devs a ring.

Currently, Mojang only provides the log generated by their obfuscater of choice, ProGuard. This log is mainly intended for developers to be able to debug Minecraft when it is obfuscated, but Mojang has since released it to the community.

It doesn't include any of the handy stuff, like parameters or documentation. If Mojang did want to include this, they would have to either develop their own format (which they probably wouldn't do) or use an existing format.

They would also need to combine the ProGuard logs and elements of their source code.

pete-the-dev commented 2 years ago

oh, ok.