PocketMine-MP 5.21.2 git-b2aa6396c3cc2cafdd815eacc360e1ad89599899
|
Public Member Functions | |
read (string $buffer, int &$offset=0, int $maxDepth=0) | |
readByte () | |
readByteArray () | |
readDouble () | |
readFloat () | |
readHeadless (string $buffer, int $rootType, int &$offset=0, int $maxDepth=0) | |
readInt () | |
readIntArray () | |
readLong () | |
readMultiple (string $buffer, int $maxDepth=0) | |
readShort () | |
readSignedByte () | |
readSignedShort () | |
readString () | |
write (TreeRoot $data) | |
writeByte (int $v) | |
writeByteArray (string $v) | |
writeDouble (float $v) | |
writeFloat (float $v) | |
writeHeadless (Tag $data) | |
writeInt (int $v) | |
writeIntArray (array $array) | |
writeLong (int $v) | |
writeMultiple (array $data) | |
writeShort (int $v) | |
writeString (string $v) | |
Static Protected Member Functions | |
static | checkReadStringLength (int $len) |
static | checkWriteStringLength (int $len) |
Protected Attributes | |
$buffer | |
Base Named Binary Tag encoder/decoder
Definition at line 35 of file BaseNbtSerializer.php.
pocketmine\nbt\BaseNbtSerializer::__construct | ( | ) |
Definition at line 39 of file BaseNbtSerializer.php.
|
staticprotected |
NbtDataException |
Definition at line 185 of file BaseNbtSerializer.php.
|
staticprotected |
pocketmine\nbt\BaseNbtSerializer::read | ( | string | $buffer, |
int & | $offset = 0, | ||
int | $maxDepth = 0 ) |
Decodes NBT from the given binary string and returns it.
int | $offset | reference parameter |
NbtDataException |
Definition at line 64 of file BaseNbtSerializer.php.
pocketmine\nbt\BaseNbtSerializer::readByte | ( | ) |
BinaryDataException |
Implements pocketmine\nbt\NbtStreamReader.
Definition at line 157 of file BaseNbtSerializer.php.
pocketmine\nbt\BaseNbtSerializer::readByteArray | ( | ) |
BinaryDataException |
Implements pocketmine\nbt\NbtStreamReader.
Definition at line 169 of file BaseNbtSerializer.php.
|
inherited |
BinaryDataException |
Implemented in pocketmine\nbt\BigEndianNbtSerializer, pocketmine\nbt\LittleEndianNbtSerializer, and pocketmine\network\mcpe\protocol\serializer\NetworkNbtSerializer.
|
inherited |
BinaryDataException |
Implemented in pocketmine\nbt\BigEndianNbtSerializer, pocketmine\nbt\LittleEndianNbtSerializer, and pocketmine\network\mcpe\protocol\serializer\NetworkNbtSerializer.
pocketmine\nbt\BaseNbtSerializer::readHeadless | ( | string | $buffer, |
int | $rootType, | ||
int & | $offset = 0, | ||
int | $maxDepth = 0 ) |
Reads a tag without a header from the buffer and returns it. The tag does not have a name, and the type is not specified by the binary data. Only the tag's raw binary value is present. This could be used if the expected root type is always the same.
This format is not usually seen in the wild, but it is used in some places in the Minecraft: Bedrock network protocol.
NbtDataException |
Definition at line 87 of file BaseNbtSerializer.php.
|
inherited |
BinaryDataException |
Implemented in pocketmine\nbt\BigEndianNbtSerializer, pocketmine\nbt\LittleEndianNbtSerializer, and pocketmine\network\mcpe\protocol\serializer\NetworkNbtSerializer.
|
inherited |
BinaryDataException |
Implemented in pocketmine\nbt\BigEndianNbtSerializer, pocketmine\nbt\LittleEndianNbtSerializer, and pocketmine\network\mcpe\protocol\serializer\NetworkNbtSerializer.
|
inherited |
BinaryDataException |
Implemented in pocketmine\nbt\BigEndianNbtSerializer, pocketmine\nbt\LittleEndianNbtSerializer, and pocketmine\network\mcpe\protocol\serializer\NetworkNbtSerializer.
pocketmine\nbt\BaseNbtSerializer::readMultiple | ( | string | $buffer, |
int | $maxDepth = 0 ) |
Decodes a list of NBT tags into objects and returns them.
TODO: This is only necessary because we don't have a streams API worth mentioning. Get rid of this in the future.
NbtDataException |
Definition at line 104 of file BaseNbtSerializer.php.
|
inherited |
BinaryDataException |
Implemented in pocketmine\nbt\BigEndianNbtSerializer, pocketmine\nbt\LittleEndianNbtSerializer, and pocketmine\network\mcpe\protocol\serializer\NetworkNbtSerializer.
pocketmine\nbt\BaseNbtSerializer::readSignedByte | ( | ) |
BinaryDataException |
Implements pocketmine\nbt\NbtStreamReader.
Definition at line 161 of file BaseNbtSerializer.php.
|
inherited |
BinaryDataException |
Implemented in pocketmine\nbt\BigEndianNbtSerializer, pocketmine\nbt\LittleEndianNbtSerializer, and pocketmine\network\mcpe\protocol\serializer\NetworkNbtSerializer.
pocketmine\nbt\BaseNbtSerializer::readString | ( | ) |
BinaryDataException |
Implements pocketmine\nbt\NbtStreamReader.
Reimplemented in pocketmine\network\mcpe\protocol\serializer\NetworkNbtSerializer.
Definition at line 202 of file BaseNbtSerializer.php.
pocketmine\nbt\BaseNbtSerializer::write | ( | TreeRoot | $data | ) |
Definition at line 126 of file BaseNbtSerializer.php.
pocketmine\nbt\BaseNbtSerializer::writeByte | ( | int | $v | ) |
Implements pocketmine\nbt\NbtStreamWriter.
Definition at line 165 of file BaseNbtSerializer.php.
pocketmine\nbt\BaseNbtSerializer::writeByteArray | ( | string | $v | ) |
Implements pocketmine\nbt\NbtStreamWriter.
Definition at line 177 of file BaseNbtSerializer.php.
pocketmine\nbt\BaseNbtSerializer::writeHeadless | ( | Tag | $data | ) |
Writes a nameless tag without any header information. The reader of the data must know what type to expect, as it is not specified in the data.
Definition at line 140 of file BaseNbtSerializer.php.
|
inherited |
int[] | $array |
Implemented in pocketmine\nbt\BigEndianNbtSerializer, pocketmine\nbt\LittleEndianNbtSerializer, and pocketmine\network\mcpe\protocol\serializer\NetworkNbtSerializer.
pocketmine\nbt\BaseNbtSerializer::writeMultiple | ( | array | $data | ) |
TreeRoot[] | $data |
Definition at line 149 of file BaseNbtSerializer.php.
pocketmine\nbt\BaseNbtSerializer::writeString | ( | string | $v | ) |
InvalidArgumentException if the string is too long
Implements pocketmine\nbt\NbtStreamWriter.
Reimplemented in pocketmine\network\mcpe\protocol\serializer\NetworkNbtSerializer.
Definition at line 209 of file BaseNbtSerializer.php.
|
protected |
Definition at line 37 of file BaseNbtSerializer.php.