mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 17:59:48 +00:00
Improved Falling blocks physics, entity kill, chunk unserialize, fixed flat generator color, fixed nbt tags __toString(), fixed explosion offsets, fixed increased player interaction range in creative
This commit is contained in:
@ -88,4 +88,14 @@ class Compound extends NamedTag implements \ArrayAccess{
|
||||
}
|
||||
$nbt->writeTag(new End);
|
||||
}
|
||||
|
||||
public function __toString(){
|
||||
$str = get_class($this) . "{\n";
|
||||
foreach($this as $tag){
|
||||
if($tag instanceof Tag){
|
||||
$str .= get_class($tag) . ":" . $tag->__toString() . "\n";
|
||||
}
|
||||
}
|
||||
return $str . "}";
|
||||
}
|
||||
}
|
@ -197,4 +197,14 @@ class Enum extends NamedTag implements \ArrayAccess, \Countable{
|
||||
$tag->write($nbt);
|
||||
}
|
||||
}
|
||||
|
||||
public function __toString(){
|
||||
$str = get_class($this) . "{\n";
|
||||
foreach($this as $tag){
|
||||
if($tag instanceof Tag){
|
||||
$str .= get_class($tag) . ":" . $tag->__toString() . "\n";
|
||||
}
|
||||
}
|
||||
return $str . "}";
|
||||
}
|
||||
}
|
||||
|
@ -44,4 +44,10 @@ class IntArray extends NamedTag{
|
||||
$nbt->putInt(count($this->value));
|
||||
$nbt->put(pack($nbt->endianness === NBT::LITTLE_ENDIAN ? "V*" : "N*", ...$this->value));
|
||||
}
|
||||
|
||||
public function __toString(){
|
||||
$str = get_class($this) . "{\n";
|
||||
$str .= implode(", ", $this->value);
|
||||
return $str . "}";
|
||||
}
|
||||
}
|
@ -44,7 +44,7 @@ abstract class Tag extends \stdClass{
|
||||
|
||||
abstract public function read(NBT $nbt);
|
||||
|
||||
public final function __toString(){
|
||||
public function __toString(){
|
||||
return (string) $this->value;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user