1

I am trying to get information from a Minecraft AP. From the API you can read players inventories, but it this is what it says: here is link to pastebin

I tried to run base64 on it on python, but it gave me an output like this (only a few lines):

b'\xad\xa9\xc0d\x85\xe4\xe0\x87`\xcess\x00\x9b]e~c\xea\xaa\xb8\x9a\xa4\xdd\x958"\x8f\x0f\x10\xb9\xea\x9f2v\xdd\xcc#N\xe8x\xb4\xdd\x18\xa9\xee>\xcfM

I read a bit about it on their forums, and a few comments said stuff about "base64, gzip, nbt".

Know, I haven't really worked at decoding stuff, etc, and I am trying to understand what it all means.

Thanks

1 Answers1

1

NBT is a minecraft specific format: Named Binary Tag

So you get an NBT-File, that is zipped (compressed) in the gzip format and then Base64 encoded.

After base64 decoding you need to unzip the gzip format to get the NBT.

There's also a nbt parser in python.

jps
  • 20,041
  • 15
  • 75
  • 79
  • 1
    oh okay, I think I understand then. Thank you! –  May 27 '20 at 10:36
  • So, I am getting the value from an API. Can I just put the entire string into a txt file, or does it need to be a .dat file, and with that .dat file I use the nbt parser? –  May 27 '20 at 10:37
  • It's usually a question about memory usage. If it is small enough, you can do all steps in memory. I actually have no knowledge about Minecraft and nbt, so please check the lib and see usage examples. – jps May 27 '20 at 10:42
  • Yeah, I am mostly confused on what steps I have to do, as I am getting that information from an API that changes live. I think I kinda get it if I would have had a .dat file from Minecraft, such as "player.dat". But right now I don't really have that, which makes me really confused haha –  May 27 '20 at 10:45