acfoltzer / nbt

A parser/serializer for Minecraft's Named Binary Tag (NBT) data format.
BSD 3-Clause "New" or "Revised" License
22 stars 8 forks source link

Support new Int_Array tag; change Byte_Array tag to use byte arrays #2

Closed BartMassey closed 11 years ago

BartMassey commented 11 years ago

The first commit adds support for the new Int_Array tag introduced with Anvil. The payload is represented in Haskell as a UArray Int32 Int32 .

The second commit changes the Haskell payload representation of Byte_Array to be UArray Int32 Int8 . This latter representation seems better to me for several reasons: Minecraft bytes are supposed to be signed, indexing efficiency should be better, parallels Int_Array.

I am currently working on a Haskell round-tripping translator from Minecraft level files to XML. So far, the translator can properly decode region files in Anvil .mca format, but hasn't yet done anything with that. Thanks huge for Data.NBT, which is a big help on this project!

acfoltzer commented 11 years ago

Should I wait to merge this until you make the further developments discussed in email?

BartMassey commented 11 years ago

Sorry--somehow missed your comment here earlier. Yes, please go ahead and pull what I have now, and I'll close out my fork for the moment. I want to finish up with the actual MC stuff before I go back to the NBT.

ghost commented 11 years ago

I think this has been fixed by the merging of #5.

acfoltzer commented 11 years ago

Yes, the commits from this pull request were in #5.