You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to use the block_finder example on a Mincraft 1.18.1 world. Upon doing so, this exception was thrown:
>python3 nbtTry.py . 1 1 10 water
Preparing to scan chunk from -9:-9 to chunk 11:11 for a water
Traceback (most recent call last):
File "nbtTry.py", line 84, in <module>
sys.exit(main(world_folder, chunkx, chunkz, chunkrange, block))
File "nbtTry.py", line 33, in main
chunk = world.get_chunk(chunkx, chunkz)
File "C:\Users\ads103\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\nbt\world.py", line 183, in get_chunk
return self.chunkclass(self.get_nbt(x, z))
File "C:\Users\ads103\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\nbt\chunk.py", line 280, in __init__
Chunk.__init__(self, nbt)
File "C:\Users\ads103\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\nbt\chunk.py", line 103, in __init__
self.chunk_data = nbt['Level']
File "C:\Users\ads103\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\nbt\nbt.py", line 543, in __getitem__
raise KeyError("Tag %s does not exist" % key)
KeyError: 'Tag Level does not exist'
The text was updated successfully, but these errors were encountered:
Same issue here. Unfortunately i'm way to incompetent to fix this myself. Are there any updates coming soon?
I'd love to use this library since it looks pretty solid.
The NBT library is pretty solid when it comes to parsing the region files and NBT data, but less so when it comes to interpreting it (the functionality in chunk.py). You may even argue that the library would be better with the chunk part removed. That's not done for compatibility reasons.
My recommendation is to use replace (in the above code) world.get_chunk(chunkx, chunkz) with world.get_nbt(chunkx, chunkz) and use that in any way you want. See the example files for some inspiration.
I tried to use the block_finder example on a Mincraft 1.18.1 world. Upon doing so, this exception was thrown:
The text was updated successfully, but these errors were encountered: