-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not working with minecraft version 1.18.1 #60
Comments
Can you check the prismarine provider anvil PR on the topic ?
…On Mon, Jan 24, 2022, 11:32 Devansh Rathi ***@***.***> wrote:
Package version: 2.1.0
Node version: 16.13.0
I am trying to read a .mca file that was made by minecraft version 1.18.1.
This is the code that produced the issue (it is the same as the example in
the README):
import fs from "fs/promises";
import nbt from "prismarine-nbt";
async function test() {
const buffer = await fs.readFile(`${directory}/r.0.0.mca`);
const { parsed, type } = await nbt.parse(buffer);
console.log("JSON serialized", JSON.stringify(result, null, 2));
fs.createWriteStream("file.nbt").write(nbt.writeUncompressed(result, type)); // Write it back
}
test();
Error:
undefined:32
if (c === '\0') throw new Error('unexpected tag end')
^
Error: Read error for undefined : unexpected tag end
at Object.readPString [as nbtTagName] (eval at compile (/Users/<directory>node_modules/protodef/src/compiler.js:258:12), <anonymous>:32:31)
at nbt (eval at compile (/Users/<directory>node_modules/protodef/src/compiler.js:258:12), <anonymous>:150:61)
at CompiledProtodef.read (/Users/<directory>node_modules/protodef/src/compiler.js:70:12)
at e.message (/Users/<directory>node_modules/protodef/src/compiler.js:111:49)
at tryCatch (/Users/<directory>node_modules/protodef/src/utils.js:50:16)
at CompiledProtodef.parsePacketBuffer (/Users/<directory>node_modules/protodef/src/compiler.js:111:29)
at parseAs (/Users/<directory>node_modules/prismarine-nbt/nbt.js:63:31)
at Object.parse (/Users/<directory>node_modules/prismarine-nbt/nbt.js:121:17)
at test (file:///Users/<directory>server/trial/nbt.js:11:40)
—
Reply to this email directly, view it on GitHub
<#60>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAR437S6KK3DR6DIYKGO4NLUXUTEHANCNFSM5MU7D4TA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
I'm getting the same error on region data in 1.19 |
Same with 1.20.2 |
Completely different topic for 1.20.2, please open another issue |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Package version: 2.1.0
Node version: 16.13.0
I am trying to read a
.mca
file that was made by minecraft version 1.18.1.This is the code that produced the issue (it is the same as the example in the README):
Error:
The text was updated successfully, but these errors were encountered: