Added handling for tile picking, added API for setting item lore

worked almost out of the box (some W10 equipment bugs though)
This commit is contained in:
Dylan K. Taylor
2017-03-28 18:47:51 +01:00
parent 52f2596dc5
commit 3e76c3a6dd
3 changed files with 54 additions and 1 deletions

View File

@ -148,6 +148,17 @@ abstract class Tile extends Position{
$this->namedtag->z = new IntTag("z", $this->z);
}
public function getCleanedNBT(){
$this->saveNBT();
$tag = clone $this->namedtag;
unset($tag->x, $tag->y, $tag->z, $tag->id);
if($tag->getCount() > 0){
return $tag;
}else{
return null;
}
}
/**
* @return \pocketmine\block\Block
*/