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
{{ message }}
This repository has been archived by the owner on Mar 19, 2024. It is now read-only.
nbt.js:403 Uncaught RangeError: Offset is outside the bounds of the DataView
at DataView.getInt8 ()
at nbt.Reader.read (nbt.js:403)
at Object.nbt.parseUncompressed (nbt.js:599)
at Object.nbt.parse (nbt.js:647)
I've tried several different schematics from several different websites, and they all give the same error. I've attached a schematic file that gives the error. According to the mcedit wiki, the schematic file format follows the nbt format, so I was hoping this script would work.
Webpage is served from a Debian server, and the script is being run via latest Chrome, on windows 10.
The problem was on my end. I was returning the schematic file from Node.js Express, and the jQuery ajax function I was using was interpreting it as a string. Using the code found at: https://www.henryalgus.com/reading-binary-files-using-jquery-ajax/, I was able to get the data as an ArrayBuffer instead, which fixed the problem.
As a side note, nbt.js doesn't work properly in the browser. It expects window.zlib to be available, but I couldn't figure out how to get that working. So I just added a reference to pako, and modified nbt.js slightly to use pako.inflate instead of zlib.gunzip.
I've tried several different schematics from several different websites, and they all give the same error. I've attached a schematic file that gives the error. According to the mcedit wiki, the schematic file format follows the nbt format, so I was hoping this script would work.
Webpage is served from a Debian server, and the script is being run via latest Chrome, on windows 10.
simple-contemporary.zip
The text was updated successfully, but these errors were encountered: