Jump to content

[1.7.10] Obfuscation and ASM


kauan99

Recommended Posts

I've been delaying this issue since I started using ASM, but now my project is close to a test release and I need to know. These are the doubts:

 

1) Do minecraft classes and packages change names at runtime?

2) for fields and methods, always use Forge names when deobfuscated and mcp names when obfuscated? Notch names are never used in mod code?

3) mod stuff (names of fields, methods, classes) also get obfuscated?

4)

IClassTransformer.transform

has 2

String

parameters. What's up with that?

 

that's all. thank you.

WIP mods: easyautomation, easyenergy, easyelectronics, easymoney, easytrasportation, easysecurity, easymultiverse, easyfactions, easymagick, easyalchemy, easyseasons

Link to comment
Share on other sites

What are "forge names"?

As said, FML deobfuscates at runtime, to SRG names ("func_xxxx_xx" and the like). So in obfuscated: use SRG names, in dev env use MCP names. To use this in a coremod put @SortingIndex(1001) (or higher) on your IFMLLoadingPlugin.

 

Oh this was a name mixup on my part then. I called forge names the deobfuscated names we see when coding for Forge. and I called mcp names the func_xxx_xx stuff.

WIP mods: easyautomation, easyenergy, easyelectronics, easymoney, easytrasportation, easysecurity, easymultiverse, easyfactions, easymagick, easyalchemy, easyseasons

Link to comment
Share on other sites

wow really cool stuff. Something like that should be into Forge universal, along with the

methods

and

fields

tables. Using that class in my case would be overkill, because I would have to ship the tables along with my mod.

WIP mods: easyautomation, easyenergy, easyelectronics, easymoney, easytrasportation, easysecurity, easymultiverse, easyfactions, easymagick, easyalchemy, easyseasons

Link to comment
Share on other sites

Oh I got it now! I use the func_xxx_xx names in all my code and the class will translate them in case I'm in dev environment. I mixed up the meaning of srg and mcp names again... But I should have understood that from reading the class, and if not from that, from the impossiblity to translate from deobfuscated to obfuscated due to possible duplicates

WIP mods: easyautomation, easyenergy, easyelectronics, easymoney, easytrasportation, easysecurity, easymultiverse, easyfactions, easymagick, easyalchemy, easyseasons

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.