34    protected $cloning = 
false;
 
   39    abstract public function getType() : int;
 
   43    public function __toString(){
 
   44        return $this->toString();
 
   47    final public function toString(
int $indentation = 0) : string{
 
   48        return 
"TAG_" . $this->getTypeName() . 
"=" . $this->stringifyValue($indentation);
 
   51    abstract protected function getTypeName() : string;
 
   53    abstract protected function stringifyValue(
int $indentation) : string;
 
   64            throw new \RuntimeException(
"Recursive NBT tag dependency detected");
 
   66        $this->cloning = 
true;
 
   68        $retval = $this->makeCopy();
 
   70        $this->cloning = 
false;
 
   71        $retval->cloning = 
false;
 
 
   86        return $that instanceof $this and $this->getValue() === $that->getValue();
 
 
   89    protected static function restrictArgCount(
string $func, 
int $haveArgs, 
int $wantMaxArgs) : void{
 
   90        if($haveArgs > $wantMaxArgs){
 
   91            throw new \ArgumentCountError(
"$func() expects at most $wantMaxArgs parameters, $haveArgs given");