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

  • Unattributed@feddit.online
    link
    fedilink
    English
    arrow-up
    3
    ·
    4 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
      2
      ·
      edit-2
      3 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.

    • DaPorkchop_@lemmy.ml
      link
      fedilink
      English
      arrow-up
      2
      arrow-down
      1
      ·
      3 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.