PocketMine-MP 5.30.1 git-04494e845c8ec9ae174604b6dde6c1cc6c22953a
|
Public Member Functions | |
__clone () | |
__toString () | |
count () | |
equals (Tag $that) | |
getByte (string $name, ?int $default=null) | |
getByteArray (string $name, ?string $default=null) | |
getCompoundTag (string $name) | |
getCount () | |
getDouble (string $name, ?float $default=null) | |
getFloat (string $name, ?float $default=null) | |
getInt (string $name, ?int $default=null) | |
getIntArray (string $name, ?array $default=null) | |
getIterator () | |
getListTag (string $name) | |
getLong (string $name, ?int $default=null) | |
getShort (string $name, ?int $default=null) | |
getString (string $name, ?string $default=null) | |
getTag (string $name) | |
getType () | |
getValue () | |
merge (CompoundTag $other) | |
removeTag (string ... $names) | |
safeClone () | |
setByte (string $name, int $value) | |
setByteArray (string $name, string $value) | |
setDouble (string $name, float $value) | |
setFloat (string $name, float $value) | |
setInt (string $name, int $value) | |
setIntArray (string $name, array $value) | |
setLong (string $name, int $value) | |
setShort (string $name, int $value) | |
setString (string $name, string $value) | |
setTag (string $name, Tag $tag) | |
toString (int $indentation=0) | |
write (NbtStreamWriter $writer) | |
Static Public Member Functions | |
static | create () |
static | read (NbtStreamReader $reader, ReaderTracker $tracker) |
Protected Member Functions | |
getTypeName () | |
makeCopy () | |
stringifyValue (int $indentation) | |
Static Protected Member Functions | |
static | restrictArgCount (string $func, int $haveArgs, int $wantMaxArgs) |
Protected Attributes | |
$cloning = false | |
@phpstan-implements \IteratorAggregate<string, Tag>
Definition at line 45 of file CompoundTag.php.
pocketmine\nbt\tag\CompoundTag::__construct | ( | ) |
Definition at line 51 of file CompoundTag.php.
pocketmine\nbt\tag\CompoundTag::__clone | ( | ) |
Definition at line 333 of file CompoundTag.php.
pocketmine\nbt\tag\CompoundTag::count | ( | ) |
Definition at line 62 of file CompoundTag.php.
|
static |
Helper method for easier fluent usage.
Definition at line 58 of file CompoundTag.php.
pocketmine\nbt\tag\CompoundTag::equals | ( | Tag | $that | ) |
Compares this Tag to the given Tag and determines whether or not they are equal, based on type and value. Complex tag types should override this to provide proper value comparison.
Reimplemented from pocketmine\nbt\tag\Tag.
Definition at line 355 of file CompoundTag.php.
pocketmine\nbt\tag\CompoundTag::getByte | ( | string | $name, |
?int | $default = null ) |
Definition at line 172 of file CompoundTag.php.
pocketmine\nbt\tag\CompoundTag::getByteArray | ( | string | $name, |
?string | $default = null ) |
Definition at line 196 of file CompoundTag.php.
pocketmine\nbt\tag\CompoundTag::getCompoundTag | ( | string | $name | ) |
Returns the CompoundTag with the specified name, or null if it does not exist. Triggers an exception if a tag exists with that name and the tag is not a CompoundTag.
Definition at line 107 of file CompoundTag.php.
pocketmine\nbt\tag\CompoundTag::getCount | ( | ) |
Definition at line 69 of file CompoundTag.php.
pocketmine\nbt\tag\CompoundTag::getDouble | ( | string | $name, |
?float | $default = null ) |
Definition at line 192 of file CompoundTag.php.
pocketmine\nbt\tag\CompoundTag::getFloat | ( | string | $name, |
?float | $default = null ) |
Definition at line 188 of file CompoundTag.php.
pocketmine\nbt\tag\CompoundTag::getInt | ( | string | $name, |
?int | $default = null ) |
Definition at line 180 of file CompoundTag.php.
pocketmine\nbt\tag\CompoundTag::getIntArray | ( | string | $name, |
?array | $default = null ) |
pocketmine\nbt\tag\CompoundTag::getIterator | ( | ) |
Definition at line 347 of file CompoundTag.php.
pocketmine\nbt\tag\CompoundTag::getListTag | ( | string | $name | ) |
Returns the ListTag with the specified name, or null if it does not exist. Triggers an exception if a tag exists with that name and the tag is not a ListTag.
Definition at line 95 of file CompoundTag.php.
pocketmine\nbt\tag\CompoundTag::getLong | ( | string | $name, |
?int | $default = null ) |
Definition at line 184 of file CompoundTag.php.
pocketmine\nbt\tag\CompoundTag::getShort | ( | string | $name, |
?int | $default = null ) |
Definition at line 176 of file CompoundTag.php.
pocketmine\nbt\tag\CompoundTag::getString | ( | string | $name, |
?string | $default = null ) |
Definition at line 200 of file CompoundTag.php.
pocketmine\nbt\tag\CompoundTag::getTag | ( | string | $name | ) |
Returns the tag with the specified name, or null if it does not exist.
Definition at line 87 of file CompoundTag.php.
pocketmine\nbt\tag\CompoundTag::getType | ( | ) |
Reimplemented from pocketmine\nbt\tag\Tag.
Definition at line 287 of file CompoundTag.php.
|
protected |
Reimplemented from pocketmine\nbt\tag\Tag.
Definition at line 283 of file CompoundTag.php.
pocketmine\nbt\tag\CompoundTag::getValue | ( | ) |
Reimplemented from pocketmine\nbt\tag\Tag.
Definition at line 76 of file CompoundTag.php.
|
protected |
Reimplemented from pocketmine\nbt\tag\Tag.
Definition at line 339 of file CompoundTag.php.
pocketmine\nbt\tag\CompoundTag::merge | ( | CompoundTag | $other | ) |
Returns a copy of this CompoundTag with values from the given CompoundTag merged into it. Tags that exist both in this tag and the other will be overwritten by the tag in the other.
This deep-clones all tags.
Definition at line 376 of file CompoundTag.php.
|
static |
Definition at line 291 of file CompoundTag.php.
pocketmine\nbt\tag\CompoundTag::removeTag | ( | string ... | $names | ) |
Removes the child tags with the specified names from the CompoundTag. This function accepts a variadic list of strings.
Definition at line 132 of file CompoundTag.php.
Referenced by pocketmine\block\tile\ShulkerBox\onBlockDestroyedHook().
|
staticprotectedinherited |
|
inherited |
pocketmine\nbt\tag\CompoundTag::setByte | ( | string | $name, |
int | $value ) |
Definition at line 220 of file CompoundTag.php.
pocketmine\nbt\tag\CompoundTag::setByteArray | ( | string | $name, |
string | $value ) |
Definition at line 262 of file CompoundTag.php.
pocketmine\nbt\tag\CompoundTag::setDouble | ( | string | $name, |
float | $value ) |
Definition at line 255 of file CompoundTag.php.
pocketmine\nbt\tag\CompoundTag::setFloat | ( | string | $name, |
float | $value ) |
Definition at line 248 of file CompoundTag.php.
pocketmine\nbt\tag\CompoundTag::setInt | ( | string | $name, |
int | $value ) |
Definition at line 234 of file CompoundTag.php.
Referenced by pocketmine\block\tile\Chest\addAdditionalSpawnData(), pocketmine\block\tile\Lectern\addAdditionalSpawnData(), pocketmine\block\tile\Chest\writeSaveData(), and pocketmine\block\tile\Lectern\writeSaveData().
pocketmine\nbt\tag\CompoundTag::setIntArray | ( | string | $name, |
array | $value ) |
int[] | $value | @phpstan-param list<int> $value |
Definition at line 279 of file CompoundTag.php.
pocketmine\nbt\tag\CompoundTag::setLong | ( | string | $name, |
int | $value ) |
Definition at line 241 of file CompoundTag.php.
pocketmine\nbt\tag\CompoundTag::setShort | ( | string | $name, |
int | $value ) |
Definition at line 227 of file CompoundTag.php.
pocketmine\nbt\tag\CompoundTag::setString | ( | string | $name, |
string | $value ) |
Definition at line 269 of file CompoundTag.php.
pocketmine\nbt\tag\CompoundTag::setTag | ( | string | $name, |
Tag | $tag ) |
Sets the specified Tag as a child tag of the CompoundTag at the offset specified by the tag's name.
Definition at line 120 of file CompoundTag.php.
Referenced by pocketmine\block\tile\FlowerPot\addAdditionalSpawnData(), pocketmine\block\tile\Jukebox\addAdditionalSpawnData(), pocketmine\block\tile\Lectern\addAdditionalSpawnData(), pocketmine\block\tile\FlowerPot\writeSaveData(), pocketmine\block\tile\Jukebox\writeSaveData(), pocketmine\block\tile\Lectern\writeSaveData(), and pocketmine\block\tile\MonsterSpawner\writeSaveData().
|
protected |
Reimplemented from pocketmine\nbt\tag\Tag.
Definition at line 325 of file CompoundTag.php.
|
finalinherited |
pocketmine\nbt\tag\CompoundTag::write | ( | NbtStreamWriter | $writer | ) |
Reimplemented from pocketmine\nbt\tag\Tag.
Definition at line 311 of file CompoundTag.php.