-
-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Description
Recently The-Minecraft-Overviewer has not been working at all for me. It just grinds to a halt after giving a few errors like:
ERROR:root:Could not render chunk 25,-27 for some reason. This is likely a render primitive option error.
...
OverflowError: Python integer -8924955784983347200 out of bounds for uint64
I think the problem (or the reason it even worked before) is that numpy.asarray(long_array, dtype=numpy.uint64) silently casted sint64 to uint64. But not any more. Of course the long_array should contain uint64 values to begin with. Here is a patch to fix that:
diff --git a/overviewer_core/nbt.py b/overviewer_core/nbt.py
index 8461fbc..a5f2478 100644
--- a/overviewer_core/nbt.py
+++ b/overviewer_core/nbt.py
@@ -153,7 +153,7 @@ class NBTFileReader(object):
def _read_tag_long_array(self):
length = self._uint.unpack(self._file.read(4))[0]
long_bytes = self._file.read(length * 8)
- return struct.unpack(">%iq" % length, long_bytes)
+ return struct.unpack(">%iQ" % length, long_bytes)
def _read_tag_string(self):
length = self._ushort.unpack(self._file.read(2))[0]
Metadata
Metadata
Assignees
Labels
No labels