Documentation

TreeRoot
in package

This class wraps around the root Tag for NBT files to avoid losing the name information.

Table of Contents

$name  : string
$root  : Tag
__construct()  : mixed
__toString()  : mixed
equals()  : bool
getName()  : string
getTag()  : Tag
mustGetCompoundTag()  : CompoundTag
Helper to reduce boilerplate code for most common NBT usages that use Compound roots.

Properties

Methods

__construct()

public __construct(Tag $root[, string $name = "" ]) : mixed
Parameters
$root : Tag
$name : string = ""
Return values
mixed

__toString()

public __toString() : mixed
Return values
mixed

getName()

public getName() : string
Return values
string

mustGetCompoundTag()

Helper to reduce boilerplate code for most common NBT usages that use Compound roots.

public mustGetCompoundTag() : CompoundTag

TODO: this ought to be replaced by schema validation in the future

Tags
throws
NbtDataException

if the root is not a Compound

Return values
CompoundTag

Search results