Open BJTMastermind opened 2 years ago
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 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.