1. Dance

    Dance Well-Known Member

    Guild Master
    Two or three days ago I got bored and decided to try making an NBT parser in Java using the wiki. It's been months since I've even touched the language, so I wanted to get back into it with this for my first project. I just finished last night and pushed it to GitHub this morning (github.com/Dance-Dog/NBTView).

    Main Function - github.com/Dance-Dog/NBTView/blob/master/src/main/java/com/dancedog/nbtview/NBTView.java#L31

    Primary Parsing Function - github.com/Dance-Dog/NBTView/blob/master/src/main/java/com/dancedog/nbtview/Parser.java#L45

    I tried my best to cover the parsing process through comments, but essentially I'm just incrementing the index variable and working my way through a byte array.

    Feel free to look at it if you have the time and let me know what could be neatened up, optimized, etc. I've tested using the three files in the test folder and have gotten quick, accurate results for each of those, but working code isn't always good code.


Share This Page