Added extra data printing for Items, non-automatic bytearray on NBT

This commit is contained in:
Shoghi Cervantes
2015-08-06 14:51:41 +02:00
parent d0bfc826ea
commit 2cec6812a8
2 changed files with 9 additions and 6 deletions

View File

@ -920,7 +920,10 @@ class Item{
return $this;
}
/**
* @return string
*/
public function getCompoundTag(){
return $this->nbt;
}
@ -1045,7 +1048,7 @@ class Item{
}
final public function __toString(){
return "Item " . $this->name . " (" . $this->id . ":" . ($this->meta === null ? "?" : $this->meta) . ")x" . $this->count;
return "Item " . $this->name . " (" . $this->id . ":" . ($this->meta === null ? "?" : $this->meta) . ")x" . $this->count . ($this->hasCompoundTag() ? " userData:0x".bin2hex($this->getCompoundTag()) : "");
}
public function getDestroySpeed(Block $block, Player $player){