misode / vscode-nbt

NBT extension for VSCode
https://marketplace.visualstudio.com/items?itemName=Misodee.vscode-nbt
MIT License
153 stars 9 forks source link

Add endian configuration to support Bedrock Edition #45

Open hhhxiao opened 1 year ago

hhhxiao commented 1 year ago

The Java version and the Bedrock version have different endianness when parse NBT format, and the Bedrock version is little-endian in the disk, but I noticed that in https://github.com/misode/vscode-nbt/blob/5cac73104c2453aa885acb1c819c4f07e3702ba1/src/NbtDocument.ts#LL41C14-L41C14

The endianness is hard-coded to read in little-endian only if the file extension is .mcstructure. Therefore I suggest that a configurable option can be added to override this value to support Bedrock Edition. (This change will not affect developers of the java version)

misode commented 9 months ago

@hhhxiao I believe this was fixed together with #52 in version 0.8.2. Could you confirm whether this issue still exists?