Deobfuscating and Commenting NMS

Discussion in 'Plugin Development' started by zachoooo, Jul 22, 2013.

Thread Status:
Not open for further replies.
  1. Offline


    Hello everyone. I'm not exactly sure where to put this, but this seems like the right place. To many, "NMS" or net.minecraft.server code has always been a place of mystery. A poorly documented place full of mystery that can only be understood by the best of coders. I myself once thought this, until I took a look at the craftbukkit github myself.

    NMS code is really not that complicated. The only problem is that it is completely unobfuscated and barely commented. I honestly have no idea how the bukkit developers were able to code craftbukkit with method names like a(), bc(), and s_(). Obfuscated code appears throughout the project and code is only written in clear text if it wasn't part of the original minecraft code.

    In the interest of expanding peoples understanding of and ability to use NMS code in their project when needed, I feel it would it be best to start deobfuscating NMS methods. Renaming methods, variables, etc to something notch would have named them. Commenting wouldn't hurt either.

    Although it would be a pretty big undertaking, I think it would really help plugin developers. It took me around 10-20 minutes to find the method I wanted, do thorough testing to ensure it was exactly the method I wanted and not a slight variation or different method entirely, and start implementing it in my code.

    Feel free to discuss, I personally feel the efforts wouldn't be wasted
    foodyling likes this.
  2. Offline


    Its meant to be this way so that people cant play the game for free (Steal the source).
  3. Offline



    But this isn't really the place to discuss that.
  4. Offline


    But Craftbukkit is open-source. Craftbukkit in itself is partially stolen

    And MCP doesn't name the methods either (entirely)!

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: Jun 3, 2016
  5. Offline


    zachoooo Bukkit probably wanted to do this but there are so many new features every version that it would be too hard to keep up with... So instead they just renamed the methods and kept the variables.
  6. Offline


    I use a combination of MCP and to get the fields and methods I need. It is not hard to get what you want at all once you know how to get it
  7. Offline


    But if everything is renamed how do you compare it to the methods in CB
  8. Offline


    The thing about Bukkit is that they mark the sections that they have edited.
  9. Offline


    Basically Dinnerbone decided to join the bukkit team, if you dont know who he is, I'm surprised. He's a developer at Mojang! Bukkit is very fortunate to have an actual minecraft developer to refer to.
  10. Offline


    So you think I should be asking Dinnerbone? I don't know how available he would be.
  11. Offline


    No, my point is Bukkit most likely had help from a Minecraft developer himself with deobfuscation/NMS.
  12. Offline


    Dinnerbone partially created Bukkit, and was asked to join Mojang because of that
  13. Offline


    Wow! I never knew that!
    I found out about Grum but I'm not sure if he is the Grumm that made upisde down animals.
Thread Status:
Not open for further replies.

Share This Page