Minecraft: Java Edition has been obfuscated since its release. This obfuscation meant that people couldn’t see our source code. Instead, everything was scrambled – and those who wanted to mod Java Edition had to try and piece together what every class and function in the code did.

Modding is at the heart of Java Edition – and obfuscation makes modding harder. We’re excited about this change to remove obfuscation, as it should make it quicker and easier for modders to create and improve mods. Now you won’t have to untangle tricky code or deal with unclear names. What’s more, de-bugging will become more straightforward, and crash logs will actually be readable!

surprisingly fantastic and consumer friendly move from mojang, good on them

  • DaPorkchop_@lemmy.ml
    link
    fedilink
    English
    arrow-up
    21
    ·
    14 hours ago

    This doesn’t really change too much for the modding scene, it just allows the deobfuscation step to be skipped when setting up a dev environment. Mojang has already been providing official deobfuscation mappings for years, and before that we had community-made ones which were already pretty great.

    There are already plenty of mods which drastically overhaul how major parts of the game work to get better performance, and there are some projects like Gregtech: New Horizons and CleanroomMC which have pretty much completely torn apart and rebuilt the game on older versions from before official deobfuscation mappings were even available.

    • Unattributed@feddit.online
      link
      fedilink
      English
      arrow-up
      4
      ·
      8 hours ago

      Right, but this means these efforts can be undertaken on the current release, and done without having to work around Mohjang’s obfuscation.

      Removing this kind of barrier is a major change. Less time will be spent on trying to understand code that has been obscured from view. It will be easier to ensure “correctness” in code that is optimizing the server (ie, that new code will not break internal dependencies). It will be easier to ensure compatibility between the official release and community based extensions.

      I understand that the modding community has been able to do a lot up to this point…(I play on an optimized modpack). But, I’m betting this will actually produce a larger jump in terms of the efficiency of all codebases - including Mohjangs. Just the reports that document issues (not CVE level issues) for Mohjang will lead to them improving the base code.

      • brucethemoose@lemmy.world
        link
        fedilink
        English
        arrow-up
        3
        ·
        edit-2
        7 hours ago

        It has. There have been major rewrites of parts of the codebase, like Sodium, Cubic Chunk, server frameworks, just to start.

        Major performance issues, and associated code fixes, have been repeatedly reported to Mojang’s tracker.

        The issue is that any major modification is inherently incompatible with other major modifications, hence most persist for one version (or a few) before the devs burns out maintaining it. There are two solutions to this:

        • Get Mojang to pull in large optimizations. Thus far, they have been uninterested in this (though some controversy over Optifine may have left a bad taste).

        • Pull the changes into a modding framework. Understandably, Fabric/Forge aren’t willing to pull in a huge overhaul they’d have to maintain. Mojang may have similar feelings.

        Some modifications (like Sodium) minimize vanilla changes to prioritize compatibility, and are popular to the extent that some other mods implement workarounds for them specifically. But this is rare, and it’s still problematic.

        • Unattributed@feddit.online
          link
          fedilink
          English
          arrow-up
          1
          ·
          34 minutes ago

          Get Mojang to pull in large optimizations. Thus far, they have been uninterested in this (though some controversy over Optifine may have left a bad taste).

          I remember that. I think the issue there was it mostly handled badly… It seemed like Mojang was trying to go behind the communities back (which I thought sounded a lot like the way Microsoft does things…so I blamed them instead of Mojang). IMO - if this is an era of more open-collaboration it may be possible for Mojang to benefit from working with the community. (There is an excellent example of this in the way AMD has worked with the Open Source community…)

          Pull the changes into a modding framework. Understandably, Fabric/Forge aren’t willing to pull in a huge overhaul they’d have to maintain. Mojang may have similar feelings.

          I can see that too… That’s why I am thinking that it might be possible for there to be a more collaborative effort… Like a repository set up where community devs can submit PR’s for changes, and Mojang can either approve or deny them. If that started working well, I could see a situation where there are specifically Mojang employed community devs, the role of working on changes that will help both the main Minecraft tree and the modding community.

          (Okay, I am probably more optimistic than I should be – after all Microsoft is in the mix here…)

          • brucethemoose@lemmy.world
            link
            fedilink
            English
            arrow-up
            1
            ·
            edit-2
            22 minutes ago

            Yeah, that sounds dreamy. It could certainly work.

            And yeah, the problem is not just Microsoft but Mojang. Mojang is an extremely conservative/careful dev, even before they got bought by MS. It’s why the game hasn’t enshittified too bad, but also why development seems to move so slow for arguably the biggest game on Earth.

            Collaborating via a repo like that would be… a lot.

            Again, it’d be awesome and I think it would work, but it would be a massive step even if Microsoft wasn’t in the picture.

            • Unattributed@feddit.online
              link
              fedilink
              English
              arrow-up
              2
              ·
              14 minutes ago

              Yeah, Mojang’s conservative development style is arguably the reason for Minecraft’s success, while also being a source of frustration and friction for the community, IMO.

              MS is another story altogether, though. While Mojang is a very thoughtful company, MS is driven by profit. I’m honestly surprised there aren’t more collisions between the two cultures.

      • DaPorkchop_@lemmy.ml
        link
        fedilink
        English
        arrow-up
        2
        arrow-down
        1
        ·
        7 hours ago

        My point is that literally nobody has been looking at obfuscated code for at least 5 years by now. All the toolchains automatically handle de- and reobfuscation transparently to the point that nobody has to think about it anymore unless maybe you are one of the like 3 people who is actually maintaining the classloading stage of a modloader, or if you are manually writing a bytecode transformer (which almost nobody has needed to do for years either, ever since tools like Mixin entered the scene).

        For 99.9% of the modding community, and this includes most optimization mods, the only thing that is going to change is everyone deletes a line or two from their build.gradle and continues about their day.

        As far as reporting things to Mojang: again, nothing changes here either, everyone who has ever set up a mod dev environment already has a copy of the deobfuscated source code on their computer, which is the only thing they are looking at when inspecting the minecraft source code or making changes to it. There have been reports on the issue tracker with actual suggested code changes basically since the issue tracker became a thing.

        • Unattributed@feddit.online
          link
          fedilink
          English
          arrow-up
          1
          ·
          31 minutes ago

          Okay - I am a bit of a dreamer, but I hope that Mojang dropping the obfuscation side of things is a sign that they are interested in working more closely with the community.

          Of course, if I were to put on my pessimistic hat, I might think this is a move for Mojang to distance themselves from the Java edition as it’s likely that Microsoft thinks from a business perspective focusing on Bedrock is a better deal.