Jump to content

Recommended Posts

Posted

I am trying to port my mods from 1.6.4 to 1.7.10 and have run into a very serious problem: Large swaths of the code are still functionally or even completely obfuscated.

The really high-traffic functions have their names set, but their arguments are still things like "p_345983459", and most of the code is still field_this and func_that.

 

I cannot possibly develop when so many of the functions I rely on are unnamed and hidden in a mass of 300+ obfuscated names, and the fact that I can no longer modify the vanilla code to check references and effects of various parameters means I cannot work it out on my own like I used to.

 

I have tried updating to the newest version of Forge, which did not help; is there some way I can get some level of functionality like that which I had in 1.6?

 

EDIT:

I just realized that I accidentally posted this in the wrong section. Can a moderator please move it to the correct location?

http://www.minecraftforge.net/forum/index.php/board,73.0.html

Posted

I am trying to port my mods from 1.6.4 to 1.7.10 and have run into a very serious problem: Large swaths of the code are still functionally or even completely obfuscated.

The really high-traffic functions have their names set, but their arguments are still things like "p_345983459", and most of the code is still field_this and func_that.

1) Those are not obfuscated names those are unique SRG names

2) The 'modder friendly' names are supplied by the community to get to work.

I cannot possibly develop when so many of the functions I rely on are unnamed and hidden in a mass of 300+ obfuscated names, and the fact that I can no longer modify the vanilla code to check references and effects of various parameters means I cannot work it out on my own like I used to.
Welcome to minecraft modding, this is just a thing of life. As for not being able to read the source, it is there, you can read it, you just cant MODIFY it. And you can EASILY find references of anything. So, learn to your use IDE better I guess.

I have tried updating to the newest version of Forge, which did not help; is there some way I can get some level of functionality like that which I had in 1.6?
We have superior functionality to 1.6, All of the things that were named in 1.6 are still named in 1.7, the things that are GONE are GONE not renamed or anything stupid like that.

EDIT:

I just realized that I accidentally posted this in the wrong section. Can a moderator please move it to the correct location?

http://www.minecraftforge.net/forum/index.php/board,73.0.html

*notes renforcment of lack of attention to detail.*

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

I am trying to port my mods from 1.6.4 to 1.7.10 and have run into a very serious problem: Large swaths of the code are still functionally or even completely obfuscated.

The really high-traffic functions have their names set, but their arguments are still things like "p_345983459", and most of the code is still field_this and func_that.

1) Those are not obfuscated names those are unique SRG names

Fair enough; I misused a term.

 

2) The 'modder friendly' names are supplied by the community to get to work.

I realize that, but in past updates, the new names arrived fairly quickly, often within weeks of the update. Forge for 1.7 has been out for months, and the fact that 75% of the code is still unreadable seems very odd to me. I was suspecting that something had gone wrong with the installation.

 

I cannot possibly develop when so many of the functions I rely on are unnamed and hidden in a mass of 300+ obfuscated names, and the fact that I can no longer modify the vanilla code to check references and effects of various parameters means I cannot work it out on my own like I used to.
Welcome to minecraft modding, this is just a thing of life. As for not being able to read the source, it is there, you can read it, you just cant MODIFY it. And you can EASILY find references of anything. So, learn to your use IDE better I guess.

Half of the way I reverse-engineer this sort of code is by forcing various parameters and testing their effects. This is no longer possible in this version, hence my point.

Also, you say "Welcome to modding", but as far as I have experienced, unless you are one of the first mods to update, it is a rather rare occurrence; as mentioned above, I have never before seen this much code still scrambled this late into a version's life, and I have been modding since before the fiasco that was 1.3.

 

I have tried updating to the newest version of Forge, which did not help; is there some way I can get some level of functionality like that which I had in 1.6?
We have superior functionality to 1.6, All of the things that were named in 1.6 are still named in 1.7, the things that are GONE are GONE not renamed or anything stupid like that.

I am not talking about code, but was again wondering if there was some other repository of updated names and/or a way to edit the source in the dev environment. I understand your disapproval of the latter when used to make mods, but if only done in the developer environment for the sake of debugging, that is not an issue.

 

EDIT:

I just realized that I accidentally posted this in the wrong section. Can a moderator please move it to the correct location?

http://www.minecraftforge.net/forum/index.php/board,73.0.html

*notes renforcment of lack of attention to detail.*

More like having two adjacent tabs and posting in the wrong one. Simple mistakes are easy to make.

 

 

If it comes down to it, I may well try hybridizing the MCP and Forge environments, so that I can at least get editable source, allowing me to debug as I see fit. It may well not work, but in lieu of a better approach...

Posted

Many of the methods are the same, but just using the SRG names again.  So you can often compare the 1.6.4 source with the 1.7.10 to guess what the equivalent functions are.  Based on the argument set and the rest of the code (which should be easy to see if it is equivalent) you should have fairly high confidence in figuring them out.

 

I have also run into situations where I had to get into the code that was less readable, but for me it is rare even on 1.7.10.  I guess I'm just digging around in more common areas of modding...

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

Posted

Many of the methods are the same, but just using the SRG names again.  So you can often compare the 1.6.4 source with the 1.7.10 to guess what the equivalent functions are.  Based on the argument set and the rest of the code (which should be easy to see if it is equivalent) you should have fairly high confidence in figuring them out.

Normally, yes, but the problem here is that there are, depending on the class, dozens or hundreds of methods with SRG names that are not readily distinguishable. A line-by-line search could probably do it, but that is so time-consuming and inefficient it would be better just to wait until more code is given proper names. The problem is compounded by the naming of all the arguments as p_*, because that makes everything "look" the same as each other and unlike their 1.6 counterparts, and greatly stifles at-a-glance comparisons.

 

 

I have also run into situations where I had to get into the code that was less readable, but for me it is rare even on 1.7.10.  I guess I'm just digging around in more common areas of modding...

I have had to do it too, but it was always "backwater" code like obscure parts of the render engine or chunk provider stuff. Now it is in what I call frontline code; furnace recipes, common world operations (markBlockForRenderUpdate being the most recently discovered example), various entity methods and fields...

Some, like EntityFallingBlock, have literally every field as an SRG name. Other classes do the same with their methods.

 

This is actually another case where I would like to be able to edit the source; that way, as I work out names and fields, I can rename them as needed. I could also fix the p_ names of the arguments.

Posted

I'm not sure how the MCP project works (I think they're the guys coming up with the human-readable names), but maybe you can submit stuff you figure out.  Keep in mind that all this stuff is done by volunteers as a community project.  Maybe you can contribute as well

 

For my own sanity, where possible I'll extend the vanilla block and @Override, create wrapper methods, or even just add comments for what I can to be more readable.

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

Posted

I'm not sure how the MCP project works (I think they're the guys coming up with the human-readable names), but maybe you can submit stuff you figure out.  Keep in mind that all this stuff is done by volunteers as a community project.  Maybe you can contribute as well

The problem is, if I submit a name, if it goes through at all - something my experience has taught me is unlikely - that it will have to wait until a new MCP build, something which may well not happen again until a new MC version comes out. Given that said version will be MC 1.8, there is no point in trying to get further 1.7 updates.

 

For my own sanity, where possible I'll extend the vanilla block and @Override, create wrapper methods, or even just add comments for what I can to be more readable.

That would work if it was my own class, yes. The problem is where I am calling functions, like in the world class, which happens to be where my worst problems are.

 

By the way, markBlockForRenderUpdate is now func_147479_m.

Posted

That would work if it was my own class, yes. The problem is where I am calling functions, like in the world class, which happens to be where my worst problems are.

 

By the way, markBlockForRenderUpdate is now func_147479_m.

No, what I'm saying is that for functions you figure out you can make a method in your own class that calls the other method.

 

Like this:

public void markBlockForRenderUpdate(int parX, int parY, int parZ)
{
    World.func_147479_m(parX, parY, parZ);
}

 

It is still bit of a pain, but can help improve the readability and might save you some headache for those methods you use a lot.

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

Posted

That would work if it was my own class, yes. The problem is where I am calling functions, like in the world class, which happens to be where my worst problems are.

 

By the way, markBlockForRenderUpdate is now func_147479_m.

No, what I'm saying is that for functions you figure out you can make a method in your own class that calls the other method.

 

Like this:

public void markBlockForRenderUpdate(int parX, int parY, int parZ)
{
    World.func_147479_m(parX, parY, parZ);
}

 

It is still bit of a pain, but can help improve the readability and might save you some headache for those methods you use a lot.

 

Clever. I like that.

 

I am actually going to do it whether or not functions get renamed, because by "funneling" all my calls through something I control I can reduce the amount of changes needed from update to update. :D

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

    • When I first heard about Bitcoin back in 2018, I was skeptical. The idea of a decentralized, digital currency seemed too good to be true. But I was intrigued as I learned more about the technology behind it and its potential. I started small, investing just a few hundred dollars, dipping my toes into the cryptocurrency waters. At first, it was exhilarating to watch the value of my investment grow exponentially. I felt like I was part of the future, an early adopter of this revolutionary new asset. But that euphoria was short-lived. One day, I logged into my digital wallet only to find it empty - my Bitcoin had vanished without a trace. It turned out that the online exchange I had trusted had been hacked, and my funds were stolen. I was devastated, both financially and emotionally. All the potential I had seen in Bitcoin was tainted by the harsh reality that with decentralization came a lack of regulation and oversight. My hard-earned money was gone, lost to the ether of the digital world. This experience taught me a painful lesson about the price of trust in the uncharted territory of cryptocurrency. While the technology holds incredible promise, the risks can be catastrophic if you don't approach it with extreme caution. My Bitcoin investment gamble had failed, and I was left to pick up the pieces, wiser but poorer for having placed my faith in the wrong hands. My sincere appreciation goes to MUYERN TRUST HACKER. You are my hero in recovering my lost funds. Send a direct m a i l ( muyerntrusted ( @ ) mail-me ( . )c o m ) or message on whats app : + 1 ( 4-4-0 ) ( 3 -3 -5 ) ( 0-2-0-5 )
    • You could try posting a log (if there is no log at all, it may be the launcher you are using, the FAQ may have info on how to enable the log) as described in the FAQ, however this will probably need to be reported to/remedied by the mod author.
    • So me and a couple of friends are playing with a shitpost mod pack and one of the mods in the pack is corail tombstone and for some reason there is a problem with it, where on death to fire the player will get kicked out of the server and the tombstone will not spawn basically deleting an entire inventory, it doesn't matter what type of fire it is, whether it's from vanilla fire/lava, or from modded fire like ice&fire/lycanites and it's common enough to where everyone on the server has experienced at least once or twice and it doesn't give any crash log. a solution to this would be much appreciated thank you!
    • It is 1.12.2 - I have no idea if there is a 1.12 pack
  • Topics

×
×
  • Create New...

Important Information

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