Jump to content

[SOLVED] Is there any tool to update obfuscation mapping for mod codes?


Recommended Posts

Posted

For example, now I have these codes in my mod:

    @Override
    public void func_180434_a(WorldRenderer worldRenderer, Entity entity, float time, float f4, float f5, float f6, float f7, float f8) {
        ...
    }

Maybe in another obfuscation mapping, func_180434_a is replaced by renderParticle. If I changed the mapping, a compile error occurs.

So is there any tool that input two mappings and my codes, output rewrited codes that replaced all obfuscated methods and fields? So that I could focus on issues such as BlockPos replacing x,y,z instead of renaming func_180434_a to renderParticle.

 

Any clue could help.  :D

Author of Tao Land Mod.

width=200 height=69http://taoland.herbix.me/images/1/14/TaoLandLogo.png[/img]

Also, author of RenderTo

----

I'm not an English native speaker. I just try my best.

Posted
  On 5/9/2015 at 11:54 AM, larsgerrits said:

If you change the mappings, to what mappings did you change it and what is the compile error?

 

It's just an example.

I mean, if the deobfuscated name of a vanilla method changed in some mappings, the codes that follow old mappings and use the method couldn't be compiled when using new mappings. The same method, is named A in old mappings while named B in new mappings. My codes call A(). If I change to new mapping, A() doesn't exist and my codes can't be compiled until I change A() to B(). I'm seeking a way to do it automatically.

Author of Tao Land Mod.

width=200 height=69http://taoland.herbix.me/images/1/14/TaoLandLogo.png[/img]

Also, author of RenderTo

----

I'm not an English native speaker. I just try my best.

Posted
  On 5/10/2015 at 3:58 AM, jabelar said:

While a bit of a pain it isn't to bad to do it manually. Your IDE (like Eclipse) will highlight everything that changed as an error and you look at the mapping CSV file to look up what it changed to. You can usually do it in about 15 minutes.

 

Yes. It's easy to replace func_aaa_b to something, since aaa is an unique number. And I can simply use text replacement to achieve this.

However, if func_aaa_b is mapped to A in old mappings and B in new mappings. I have to look up A in old mappings to get func_aaa_b, and then look up it in new mappings to get B. It cost more time and I can't simply replace text because it's not unique. I have to do it manually in case change other methods with the same name. That's why I am looking for a tool.

Author of Tao Land Mod.

width=200 height=69http://taoland.herbix.me/images/1/14/TaoLandLogo.png[/img]

Also, author of RenderTo

----

I'm not an English native speaker. I just try my best.

Posted
  On 5/10/2015 at 4:27 AM, herbix said:

  Quote

While a bit of a pain it isn't to bad to do it manually. Your IDE (like Eclipse) will highlight everything that changed as an error and you look at the mapping CSV file to look up what it changed to. You can usually do it in about 15 minutes.

 

Yes. It's easy to replace func_aaa_b to something, since aaa is an unique number. And I can simply use text replacement to achieve this.

However, if func_aaa_b is mapped to A in old mappings and B in new mappings. I have to look up A in old mappings to get func_aaa_b, and then look up it in new mappings to get B. It cost more time and I can't simply replace text because it's not unique. I have to do it manually in case change other methods with the same name. That's why I am looking for a tool.

 

I think the func_aaa_b names may be unique across entire workspace but someone else would have to confirm.

Check out my tutorials here: http://jabelarminecraft.blogspot.com/

Posted
  On 5/11/2015 at 11:39 AM, herbix said:

  Quote

I think the func_aaa_b names may be unique across entire workspace but someone else would have to confirm.

 

You didn't get my point.

It's not me who defines func_aaa_b.

 

Correct.  They're SRG names.  And the way SRG works is that they are 100% identical between different versions of Forge and usually the same across versions of Minecraft (a major rewrite of a class can throw that out the window though).

 

But your point doesn't make any sense because we don't know where you're trying to get to and where you are coming from.  What version of Minecraft (and Forge) is A, what version of Minecraft (and Forge) is B, etc?

 

It doesn't help that you say you want to translate func_aaa_b to something, but can't because it's not func_aaa_b.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted

The request is actually rather simple in concept, but no there is no one off tool to remail things like that. I've asked Abrar to add that functionality to FG but its far less important than other things he needs to get done.

You can work with the Srg2Source tool on the Forge github to see if you can glue something together.

But let me warn you it's no simple task, i've done the hard part for you with S2S but it has no simple front end.

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Posted
  On 5/11/2015 at 3:11 PM, LexManos said:

The request is actually rather simple in concept, but no there is no one off tool to remail things like that. I've asked Abrar to add that functionality to FG but its far less important than other things he needs to get done.

You can work with the Srg2Source tool on the Forge github to see if you can glue something together.

But let me warn you it's no simple task, i've done the hard part for you with S2S but it has no simple front end.

Thank you, Lex.

This may be what I'm looking for. Seems I should look at Forge repositories before I asked here.

And thanks to all who replied me.

Author of Tao Land Mod.

width=200 height=69http://taoland.herbix.me/images/1/14/TaoLandLogo.png[/img]

Also, author of RenderTo

----

I'm not an English native speaker. I just try my best.

  • 4 months later...
Posted
  On 5/12/2015 at 6:01 AM, herbix said:

  Quote

The request is actually rather simple in concept, but no there is no one off tool to remail things like that. I've asked Abrar to add that functionality to FG but its far less important than other things he needs to get done.

You can work with the Srg2Source tool on the Forge github to see if you can glue something together.

But let me warn you it's no simple task, i've done the hard part for you with S2S but it has no simple front end.

Thank you, Lex.

This may be what I'm looking for. Seems I should look at Forge repositories before I asked here.

And thanks to all who replied me.

 

I am looking for something like this to update some mods. Were you able to create some easier-to-use tool to update minecraft mod source?

Posted

1) Don't hijack threads. Make your own.

2) If I understand you correctly, you want to update a mod for an older Minecraft version to a newer one? You'd have to do it yourself, which means you have to decompile an deobfuscate the mod source, make changes to the source, obfuscate and compile it again.

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

 

1.12 -> 1.13 primer by williewillus.

 

1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support.

 

http://www.howoldisminecraft1710.today/

Posted
  On 9/20/2015 at 3:28 PM, larsgerrits said:

1) Don't hijack threads. Make your own.

2) If I understand you correctly, you want to update a mod for an older Minecraft version to a newer one? You'd have to do it yourself, which means you have to decompile an deobfuscate the mod source, make changes to the source, obfuscate and compile it again.

 

I have exactly the same problem as the original author of this topic and I wanted to know if he was able to create some script which helps with the problem.

Posted

There is no tool to magically update an old mod. More changes in different versions than just mappings. If you want to update an old mod, you'll have to do as larsgerrits said. Obtain the source code (preferably by completely legal means), make any necessary changes, and then recompile it.

Don't make mods if you don't know Java.

Check out my website: http://shadowfacts.net

Developer of many mods

Posted
  On 9/20/2015 at 7:28 PM, shadowfacts said:

There is no tool to magically update an old mod. More changes in different versions than just mappings. If you want to update an old mod, you'll have to do as larsgerrits said. Obtain the source code (preferably by completely legal means), make any necessary changes, and then recompile it.

 

Thanks guys, but I am neither new to coding, nor to minecraft modding. I am looking for a tool which uses a mapping list (like the MCP Mapping table) and updates all obfuscation mapping variable, methods, classes in my code to the readable ones from the list.

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



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • There is an issue with Modular Force Field System (mffs) Remove it or try other builds
    • I never imagined I would be writing this kind of testimony, but I feel it’s important to share my experience with Malice Cyber Recovery and how they helped me recover $230,000 I lost to crypto scammers. A few months ago, I got involved in a crypto investment opportunity that seemed legitimate at first. The scammers were incredibly convincing. They showed me impressive returns, sent regular updates, and even gave me access to what looked like a real trading platform. I was initially cautious, but after seeing the returns, I began to invest more, ultimately transferring over $230,000. Unfortunately, after a few weeks, when I tried to withdraw my funds, I found that the platform had disappeared, and I could no longer contact anyone involved. It was clear I had been scammed, and I felt completely helpless. For weeks, I tried everything to get my money back—contacting the authorities, reaching out to the platform’s so-called support team (who of course were unreachable), and trying to trace the transactions myself. But everything led to dead ends. The more I researched, the more I realized just how hard it was to recover stolen crypto. I began to lose hope. That’s when I came across Malice Cyber Recovery. At first, I was skeptical. Could they really help me recover my funds after everything I had been through? I decided to reach out anyway, just to see if they could offer any guidance. From the very first conversation, their team was not only professional but also deeply empathetic. They understood exactly how I was feeling and immediately made it clear that they were dedicated to helping me recover my lost funds. Malice Cyber Recovery’s team got to work quickly. They walked me through every step of the process, explaining the methods they would use to track down my stolen crypto. Their knowledge of blockchain technology and how to trace crypto transactions was incredibly impressive. They didn’t just give me vague promises they showed me the action they were taking and the progress they were making, which gave me hope that my money wasn’t gone forever. One of the most reassuring aspects of working with Malice Cyber Recovery was their transparency. They kept me updated regularly, letting me know what they were doing, what obstacles they encountered, and how they were overcoming them. It wasn’t an easy process; tracing funds through blockchain and dealing with scammers who hide behind fake identities and complex networks is incredibly difficult. But Malice Cyber Recovery’s team was relentless. They used advanced tools and techniques to trace the flow of my funds, and within just a few weeks, they managed to locate a significant portion of my lost funds. I couldn’t believe it when they informed me that they had successfully recovered a large chunk of my money. I never thought I’d see that $230,000 again. The recovery process wasn’t instantaneous it  took time, patience, and persistence but Malice Cyber Recovery delivered on their promise.  
    • Almost, just the java -server -Xmx4G -Xms4G -Dlog4j.configurationFile=log4jformattingfix.xml -jar forge-1.12.2-14.23.5.2860.jar nogui and if that doesn't work, try java --version
    • What so just copy and paste " java -server -Xmx4G -Xms4G -Dlog4j.configurationFile=log4jformattingfix.xml -jar forge-1.12.2-14.23.5.2860.jar nogui Pause >nul " into a cmd terminal? If that's what you mean, nothing happens
    • The networking has been far simplified in 1.20.5+ The docs could be old, as Ash has said feel free to submit a PR updating the community docs. However the only real up-to-date reference would be the code itself. So your best bet is to just read the code and give it want it wants.
  • Topics

  • Who's Online (See full list)

×
×
  • Create New...

Important Information

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