Decompiled Server Methods Make No Sense!

Discussion in 'Plugin Development' started by skipperguy12, Jun 17, 2013.

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

    skipperguy12

    I'm trying to fiddle around the insides of NMS, but most of the methods look a little like this:
    Code:
        public boolean b() {
            return false;
        }
     
        public boolean c() {
            return false;
        }
     
        public int d() {
            return 13;
        }
    All of the CraftBukkit methods and variables are words and non obfuscated, is there any program or something that can make NMS nonobfuscated?

    Also, one more thing, if I used MCP on a snapshot (say for 1.6), took the files in NMS, and dropped them into NMS folder for CraftBukkit, would I be running CB for 1.6? Or would I have a lot of changing to do in CraftBukkit? I found getVersion() in MineCraftSever.java, but changing it only changes what appears in /version, nothing more.

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

    ZeusAllMighty11

    Since Bukkit has started, it's been a straggle to attempt to deobfuscate the Minecraft source code.
    There is nothing you can do about it.
     
  3. Offline

    skipperguy12

    TheGreenGamerHD
    So there's no way to have a CB version out yourself before CB itself makes it? I find that hard to believe, there must be some way to use the snapshots to make a CB version for the next MC update.
     
  4. Offline

    ZeusAllMighty11

    I didn't say that...



     
  5. Offline

    skipperguy12

    TheGreenGamerHD
    Okay, but would MCP work?
    Also, how would you go upon updating CB yourself?

    TheGreenGamerHD
    So, I looked at this:
    https://github.com/Bukkit/CraftBukkit/commit/096bab42c830051e7f3b10058858a8c90e1a38e0

    And it looks like just the pom.xml and all of the NMS code has to be updated, so MCP might work? I can't exactly test it right now, and MCP takes me a long time to set up, so, if anyone knows this won't work, please tell me before I waste like 3 hours

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

    ZeusAllMighty11

    I don't really know much about this topic, aside from it's not really supported on this forum.
     
  7. Offline

    Wingzzz

    Alright, so Minecraft every time it is compiled(I'm assuming at that stage) it is obfuscated. You will most likely find it hard to understand most of the methods/variables etc... off the bat. It's recommended when making a plugin you use the Bukkit API first and foremost, then if it is not suffice move on to some of CB's internals, and if that is finally not enough then you've really got to weigh in all factors(Difficulty level, are you capable of this? Purpose, why do you truly need to get in there? Willing to put in some extra time?.. and perhaps a few other checks..) before deciding to move over to NMS code in which you will need to deal with deciphering what is what. You're best plan of action is to search the topic you're doing and hopefully you'll find any information at all on it that others have scrubbed together. Also I would like to note that if you're going to use NMS understand every Minecraft update it will break, and not only due to Bukkit's package versioning of NMS but because sometimes methods/variables and other things can be moved around to do different things.

    I wish I could be of more help, I'll see if I can't find anything on the subject for you :).
     
  8. Offline

    skipperguy12

    WiredWingzzz
    Thanks for the reply, it's more because I really want to try and have a version of CraftBukkit out myself without having to wait for CB to actually update. I think all that needs to be done is update the net.minecraft.server package and it's content, then just recompile it, but I'm not exactly sure.
     
  9. Offline

    microgeek

    It's like updating any mod, it's time consuming, and it's a lot of work. Imagine how long it will take one person to do a job that takes a whole team of very talented individuals about a week to do. If you still want to give it a try, whip out JDGUI and MCP and compare the decompiled code and the obfuscated code, until it starts to make sense. You can look at the .csv obfuscation map included with MCP if you get lost.
     
  10. Offline

    Wingzzz

    microgeek has a very good point.

    Also note, you would need to design and implement new API for Bukkit to support any new features Minecraft has on that update (provided you want to not just update CB so it'll do bare minimum IE: run).
     
  11. Offline

    skipperguy12

    WiredWingzzz
    That's really all I do want to do, make it run
     
  12. Offline

    Wingzzz

    skipperguy12
    Well yeah, nothing could hurt of course, also it'd be pretty fun/interesting (not to mention extremely educational) to attempt this. Just need to go at it with the right mind set and attitude :)
     
Thread Status:
Not open for further replies.

Share This Page