Jump to content
  • Home
  • Files
  • Docs
Topics
  • All Content

  • This Topic
  • This Forum

  • Advanced Search
  • Existing user? Sign In  

    Sign In



    • Not recommended on shared computers


    • Forgot your password?

  • Sign Up
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • How to add mods to workspace?
Currently Supported: 1.16.X (Latest) and 1.15.X (LTS)
Sign in to follow this  
Followers 0
LaughingJackalMC

How to add mods to workspace?

By LaughingJackalMC, May 13, 2014 in Modder Support

  • Reply to this topic
  • Start new topic

Recommended Posts

LaughingJackalMC    0

LaughingJackalMC

LaughingJackalMC    0

  • Tree Puncher
  • LaughingJackalMC
  • Members
  • 0
  • 31 posts
Posted May 13, 2014

Hey, I was just exploring the workspace and found in the eclipse folder a 'mods' folder. What does this folder do? can you put other mods in it? Because that would be cool for testing integration!?                                           

  • Quote

Share this post


Link to post
Share on other sites

diesieben07    7582

diesieben07

diesieben07    7582

  • Reality Controller
  • diesieben07
  • Forum Team
  • 7582
  • 54901 posts
Posted May 13, 2014

Yes, you can put mods in it. They need to be provided in "deobfuscated" form though (that is with MCP names) or they will crash your game (unless you have CodeChickenCore, which can deobfuscate them at runtime).

  • Quote

Share this post


Link to post
Share on other sites

LaughingJackalMC    0

LaughingJackalMC

LaughingJackalMC    0

  • Tree Puncher
  • LaughingJackalMC
  • Members
  • 0
  • 31 posts
Posted May 13, 2014

Yes, you can put mods in it. They need to be provided in "deobfuscated" form though (that is with MCP names) or they will crash your game (unless you have CodeChickenCore, which can deobfuscate them at runtime).

 

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

  • Quote

Share this post


Link to post
Share on other sites

jabelar    593

jabelar

jabelar    593

  • Reality Controller
  • jabelar
  • Members
  • 593
  • 3266 posts
Posted May 13, 2014

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...

  • Quote

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

Share this post


Link to post
Share on other sites

diesieben07    7582

diesieben07

diesieben07    7582

  • Reality Controller
  • diesieben07
  • Forum Team
  • 7582
  • 54901 posts
Posted May 13, 2014

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).

  • Quote

Share this post


Link to post
Share on other sites

jabelar    593

jabelar

jabelar    593

  • Reality Controller
  • jabelar
  • Members
  • 593
  • 3266 posts
Posted May 14, 2014

Thanks diesieben, I appreciate the time you take to write up these detailed clarifications.

  • Quote

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

Share this post


Link to post
Share on other sites

hohserg    3

hohserg

hohserg    3

  • Tree Puncher
  • hohserg
  • Members
  • 3
  • 39 posts
Posted September 8, 2020 (edited)

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 September 8, 2020 by hohserg
  • Quote

Share this post


Link to post
Share on other sites

diesieben07    7582

diesieben07

diesieben07    7582

  • Reality Controller
  • diesieben07
  • Forum Team
  • 7582
  • 54901 posts
Posted September 8, 2020
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
  • Quote

Share this post


Link to post
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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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.

    • Insert image from URL
×
  • Desktop
  • Tablet
  • Phone
Sign in to follow this  
Followers 0
Go To Topic Listing



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • diesieben07
      [1.16] Custom Sign won't render

      By diesieben07 · Posted 10 minutes ago

      Probably. Vanilla loves hardcoding things. Would be best to see a Git repo of your mod so I can use the debugger.
    • diesieben07
      Cant Get a Config File Working 1.16.5

      By diesieben07 · Posted 10 minutes ago

      You can disable their crafting recipes and remove the from any creative tab.
    • kiou.23
      [1.16] Custom Sign won't render

      By kiou.23 · Posted 12 minutes ago

      I'll try it (Edit: nvm, no idea how to try it, and it may not even work) there seems to be another problem tho: I changed the wood type of the sign to OAK, just to see if it rendered with a vanilla wood type, and nope. it's still invisible. however, the edit screen has the oak sign texture (it still only stays up for milliseconds) this has to be related to something else, right?
    • Bailym
      Cant Get a Config File Working 1.16.5

      By Bailym · Posted 12 minutes ago

      Thanks for the info! I'll look into the CommonSetup stage.   Yes I was intending to only register items with true values.What's the alternative?  Is there some other way to make items unavailable in game other than just not registering them?   Thanks for the help!
    • diesieben07
      Cant Get a Config File Working 1.16.5

      By diesieben07 · Posted 19 minutes ago

      Config files are not loaded that early on purpose. They are only available from FMLCommonSetupEvent and later. From your config names I guess you want to conditionally register your items - this is a big reason why config files are not available that early. Do not conditionally register things. Always register all your items, blocks, etc.
  • Topics

    • kiou.23
      7
      [1.16] Custom Sign won't render

      By kiou.23
      Started 8 hours ago

    • Bailym
      3
      Cant Get a Config File Working 1.16.5

      By Bailym
      Started 27 minutes ago

    • e2rifia
      3
      (1.16.2) How do I use onPlayerTick?

      By e2rifia
      Started 2 hours ago

    • Linky132
      2
      [1.16.4] Block not rendering as transparent

      By Linky132
      Started Thursday at 04:28 PM

    • arkeN
      50
      Failure message: Missing License Information in file Mod File

      By arkeN
      Started October 11, 2020

  • Who's Online (See full list)

    • kiou.23
    • XenoPyax
    • diesieben07
    • scrouthtv
    • loordgek
    • samyakforever
    • vemerion
    • Bailym
    • Beethoven92
    • Veo
    • e2rifia
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • How to add mods to workspace?
  • Theme

Copyright © 2019 ForgeDevelopment LLC · Ads by Longitude Ads LLC Powered by Invision Community