PHP library for working with the NBT (Named Binary Tag) data storage format, as designed by Mojang.
LGPL-3.0 License
Bot releases are hidden (Show)
Published by dktapps almost 6 years ago
pocketmine/binaryutils
dependency to get full effect.Published by dktapps almost 6 years ago
zlib
dependency from composer.jsonPublished by dktapps almost 6 years ago
CompoundTag
and ListTag
tags not showing their names when stringifiedPublished by dktapps about 6 years ago
CompoundTag->merge()
function.CompoundTag
children with numeric string keys causing errors on iteration due to PHP array key casting stupidity.Published by dktapps over 6 years ago
pocketmine/binaryutils
^0.1.0
.php-64bit
in composer.json.Published by dktapps over 6 years ago
pocketmine/pocketmine-nbt
to pocketmine/nbt
.EndTag
and Tag
classes have been removed. All remaining tags now extend NamedTag
.NamedTag
objects no longer extend from \stdClass
.NamedTag->getValue()
no longer returns a reference.NamedTag->setValue()
has been removed. Prefer creating new tag objects instead.NamedTag->equals()
to permit comparing two arbitrary tag objects.NamedTag->__toString()
and subclass methods have been improved to the point of actually being readable.CompoundTag
changestag->SomeTag = new ...
, isset(tag->SomeTag)
, unset(tag->SomeTag)
, var_dump(tag->SomeTag)
). Attempting to access compound children using this API will now throw exceptions.NamedTag
objects only.tag[] = childTag
syntax is no longer permitted and will throw an exception (the behaviour of this was previously undefined).\Iterator
and \Countable
interfaces.ListTag
changespush()
, pop()
, shift()
, unshift()
, insert()
, remove()
, get()
, set()
, first()
, last()
, isset()
and empty()
.tag[] = newTag
syntax is now supported (will append to the end of the list).\TypeError
.\Iterator
interface.StringTag
changesNBT
changesBIG_ENDIAN
and LITTLE_ENDIAN
constants have been removed.matchList()
and matchTree()
have been removed. Prefer NamedTag->equals()
instead.NBTStream
changesread()
and readCompressed()
now directly return the decoded NBT instead, eliminating calls to getData()
.write()
and writeCompressed()
now directly accept NamedTag parameters instead, eliminating calls to setData()
.getData()
and setData()
have been removed. NBTStream
objects no longer retain references to their decoded data.JsonNBTParser
has been renamed to JsonNbtParser
.JsonNbtParser->parseJSON()
has been renamed to parseJson()
.