Portability | portable |
---|---|
Stability | experimental |
Maintainer | acfoltzer@gmail.com |
Defines a Haskell representation of Minecraft's NBT binary data
format, along with instances of Data.Serialize.Serialize
. See the
NBT specification for details:
https://raw.github.com/acfoltzer/nbt/master/NBT-spec.txt.
- data TagType
- = EndType
- | ByteType
- | ShortType
- | IntType
- | LongType
- | FloatType
- | DoubleType
- | ByteArrayType
- | StringType
- | ListType
- | CompoundType
- data NBT
- = EndTag
- | ByteTag (Maybe String) Int8
- | ShortTag (Maybe String) Int16
- | IntTag (Maybe String) Int32
- | LongTag (Maybe String) Int64
- | FloatTag (Maybe String) Float
- | DoubleTag (Maybe String) Double
- | ByteArrayTag (Maybe String) Int32 ByteString
- | StringTag (Maybe String) Int16 String
- | ListTag (Maybe String) TagType Int32 [NBT]
- | CompoundTag (Maybe String) [NBT]
Documentation
Tag types listed in order so that deriving Enum
will assign
them the correct number for the binary type field.
Primitive representation of NBT data. This type contains both named
and unnamed variants; a Nothing
name signifies an unnamed tag, so
when serialized, neither the name nor the type tag will be put.