twoolie / NBT

Python Parser/Writer for the NBT file format, and it's container the RegionFile.
MIT License
361 stars 74 forks source link

Opening servers.dat. #186

Open taitep opened 10 months ago

taitep commented 10 months ago

I want to try adding some servers to the list using python, and seems this library would work. Testing it out does not go so well tho. I opened the .minecraft folder in a terminal, and in the python shell wrote the following:

>>> from nbt import nbt
>>> nbtfile = nbt.NBTFile('./servers.dat')

I get this error: gzip.BadGzipFile: Not a gzipped file (b'\n\x00') How do i fix this? Do i need to GZip it first?