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
$name
private
string
$name
$root
private
Tag
$root
Methods
__construct()
public
__construct(Tag $root[, string $name = "" ]) : mixed
Parameters
- $root : Tag
- $name : string = ""
Return values
mixed —__toString()
public
__toString() : mixed
Return values
mixed —equals()
public
equals(TreeRoot $that) : bool
Parameters
- $that : TreeRoot
Return values
bool —getName()
public
getName() : string
Return values
string —getTag()
public
getTag() : Tag
Return values
Tag —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