-
Notifications
You must be signed in to change notification settings - Fork 10
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
Reading Bedrock level.dat/.mcstructure files #3
Comments
After looking through the source files of quartz_nbt I think the reason for this is because quartz_nbt currently does not support little-endian byte order. If this were added I believe it will work with minor changes to the code I showed. |
Bedrock edition actually makes quite a few changes to NBT format. They store some integers and longs as variable-length integers using zig-zag encoding; there are different variations of the format for disk storage vs. network traffic; root tags can be compounds or lists; and as you mentioned, they also use little-endian byte order. Supporting this would require a fairly substantial overhaul of the current code base and require changing several of the APIs, so I'm inclined to say it's unlikely that we'll support encoding/decoding of bedrock's NBT format for the foreseeable future. |
oh ok, didn't think it had that many differences. I was hoping that it could be added so there could be a good rust crate to use for both versions of the game. Do you know of any rust crates that support the bedrock format that I could use because I'm not aware of any? If not could you give me a link to bedrock nbt documentation so I could try to make my own? |
I do not know of any rust NBT libraries which support bedrock unfortunately. This wiki explains the Java format as well as how bedrock differs from it. I will be leaving this issue open however so that it can be revisited in the future. |
I am trying to use quartz_nbt to read nbt data from Bedrock files but I can't seem to get it to work.
Im getting an
Error: TagTypeMismatch { expected: 10, found: 8 }
with this code:this works fine with the java files though when the "Flavor" is also set to GzCompressed.
Any help? I do know Bedrock nbt files are Uncompressed I believe.
I can also provide the nbt files if they are needed.
Thank you.
The text was updated successfully, but these errors were encountered: