Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

How to add mods to workspace?


LaughingJackalMC
 Share

Recommended Posts

is that just the jar form? sorry im a noob!

 

Obfuscation means that it isn't easy for human to read it.  So yes the JAR contains Java code but if it is obfuscated there won't be any nice comments or formatting, and all the field and method names will be changed to something that doesn't make obvious sense.  If you have a method called initializeMyBlock() when it is obfuscated it might be called m23438_b().

 

That is generally what obfuscation means.  Specifically for Minecraft modding the issue is that mods will call vanilla code and Minecraft vanilla code is normally obfuscated.  In Forge environment, thanks to the work of MCP, we can call vanilla methods with names that make sense (e.g. worldObj.isRemote), but in actual Minecraft it needs to call the obfuscated method (e.g. f2434356_b.f243435_b). 

 

So basically the mod will work in the Forge environment if it is calling the vanilla methods based on their deobfuscated names.

 

At least that is how I understand it.  I'm a noob too...

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

Link to comment
Share on other sites

Mostly correct, but let me clarify some things.

With Minecraft, or rather Forge + MCP, there come basically 2 stages of obfuscation.

First of all there is the completely obfuscated form, as we get it from Mojang, which is just random letters used everywhere (methods named "a" or "xz", etc.).

These change every Minecraft version (even 1.6.2 => 1.6.4, at least most of the time).

 

Then there are the SRG names, which you cited (e.g. field_12345_a, func_12345_a). These stay mostly consistent between Minecraft versions, at least as far as possible.

If you reobfuscate your mod, it is transformed from the MCP names (which just translate the SRG names into a readable form) into these SRG names. Then at runtime FML deobfuscates the actual minecraft code (which contains method names like "a" or "x") into the SRG names, which is what allows mods to partially run cross-version (1.6.2 => 1.6.4).

Link to comment
Share on other sites

  • 6 years later...

I'm sorry for necroposting... But how to add some obfuscated mod to 1.14+ workspace?

CodeChickenCore ceased releasing in 1.10 because Forge(or ForgeGradle or anything else) became able to work with obfucated mods out of the box. But it ceased work in 1.14.

Any ideas?

Edited by hohserg
Link to comment
Share on other sites

20 minutes ago, hohserg said:

I'm sorry for necroposting... But how to add some obfuscated mod to 1.14+ workspace?

CodeChickenCore ceased releasing in 1.10 because Forge(or ForgeGradle or anything else) became able to work with obfucated mods out of the box. But it ceased work in 1.14.

Any ideas?

Look at the MDK build.gradle, it comes with an example for how to do it.

  • Thanks 1
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
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.

 Share



×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.