Resource Mini's Mapping Viewer - No more obfuscated NMS names!

Discussion in 'Spigot Plugin Development' started by MiniDigger, Feb 9, 2020.

  1. MiniDigger


    Hey guys

    do you know how painful it is to work with NMS? All the obfuscated names and stuff?
    You might know that you can use spigots builddata repo and the new fancy mojang mappings to get readable names for the obfuscated fields and methods.
    You might go to this page and control + f the class, search the obfuscated name, go to this page and control + f that obfuscated name to finally see the unobfuscated names you want.
    This is very tedious , especially since browsers don't deal well with such big files (I hope you can throw a couple of gigs of ram at chrome!).
    It becomes worse when you want to check how a method is named in a new version of minecraft.

    I was in exactly this situation when I updated dyescape (the RPG server I am working for, you should check my sig ;)) to 1.15. It was horrible.
    So I decided to grab a couple of beer and start a simple weekend project to make this less tedious.

    May I present you.....

    Mini's Mapping Viewer

    So what is this?
    Lets say you want to see what all these method in the pig class do.
    Thats easy. You go to, open the sidebar, go to spigot, select your version, enter "EntityPig" in the filter bar and you are presented with this:
    Now you and easily see the obfuscated names (if spigot has no mappings) and the mojang name (which might be different/better than spigot mappings).

    The reverse is also possible.
    Mojang -> 1.15 -> EntityPig:
    Now you can see how few methods and fields spigot actually manages to remap to sane names.

    So yeah, thats pretty much it. This also allows you to view client mappings, but I dont think thats much of a use for most ppl.

    Since this is a one day hackjob, its obviously not perfect.
    For starters, there is no dark mode yes, so its basically unusable, right?!
    I also really don't like the way I display/format stuff, but its almost 2:30am and I am way to drunk to try any harder.

    You can find the code for this on github
    Be sure to open issues to report bugs, suggest new features (have a nice idea for the layout?). I am also very open to PRs (but it might be worth to hit me up before you spend time on it to see if your idea is something I actually want)

    I hope this is as useful to others as it is to me.
    Please let me know what you think below!

    ~ MiniDigger
    #1 MiniDigger, Feb 9, 2020
    Last edited: Feb 9, 2020
    • Useful x 29
    • Winner x 18
    • Like x 11
    • Agree x 1
    • Funny x 1
    • Informative x 1
    • Friendly x 1
    • Creative x 1
  2. This is awesome! Nice work!
    • Like Like x 1
    • Friendly Friendly x 1
  3. Minor suggestion, if possible, adjust the search so it doesn't try and find til I stop typing, as it freezes up for me, at least on my laptop, otherwise cool stuff, is awesome.
    • Like Like x 1
    • Friendly Friendly x 1
  4. Wow. Such wow.
    • Friendly Friendly x 1
  5. MiniDigger


    yeah, I should add a debounce there, added to the list
  6. So helpful. Thanks!
    • Friendly Friendly x 1
  7. Awesome! Thanks for this website, really helpful for working with NMS stuff.
    But I wonder how are these mappings updated? (Automatically or manually?)
    And a suggestion too, will you add more mappings support like Yarn?
    • Friendly Friendly x 1
  8. MiniDigger


    Yarn and mcp are kinda planned, yes.
    Mappings are grabbed directly from mojang and spigot in your browser, so it's updated automatically.
    For spigot I had to create this file to lists versions, so spigot needs to be updated kinda manually if a new version releases.
    • Like Like x 1
  9. Guess not all heroes wear capes. Thank you!
    • Friendly Friendly x 1
  10. electronicboy

    IRC Staff

    Can't wait for the IJ plugin to go with this *runs*
    • Agree Agree x 3
    • Like Like x 2
    • Funny Funny x 2
    • Optimistic Optimistic x 1
  11. Goat status for this one bro <3
    • Friendly Friendly x 1
  12. MiniDigger


    PRs welcome! :ROFLMAO:
    • Funny Funny x 1
  13. could you add 1.13.2 to mappings? would be useful to me
  14. Thank you for this! +1
    • Friendly Friendly x 1
  15. MiniDigger


    No. First, 1.13 is dead (really, only 4% of servers use it) so it only really helps with upgrading and second, mojang only started publishing the mappings with the 1.15 snapshots, the only exception was also publishing them for 1.14.4 so ppl could see diffs. So there are no public mojang mappings for 1.13.2 I could use (and there prolly never will)
  16. @MiniDigger
    Hmmm, I got this error when running yarn command :/. Currently trying run this on my own machine


    nvm, I need to update my yarn apparently
    #16 DrOreo002, Feb 9, 2020
    Last edited: Feb 9, 2020
  17. Amazing. Can we have maven/gradle and IJ plugin plz?
  18. IJ Plugin? :O, that's a great idea
  19. MiniDigger


    Yeah, stop using outdated software ^^

    I didn't choose the limits, quasar sets those by default.
    • Like Like x 1
  20. MiniDigger