pocketmine\item\Item::setCustomBlockData PHP Méthode

setCustomBlockData() public méthode

public setCustomBlockData ( CompoundTag $compound )
$compound pocketmine\nbt\tag\CompoundTag
    public function setCustomBlockData(CompoundTag $compound)
    {
        $tags = clone $compound;
        $tags->setName("BlockEntityTag");
        if (!$this->hasCompoundTag()) {
            $tag = new CompoundTag("", []);
        } else {
            $tag = $this->getNamedTag();
        }
        $tag->BlockEntityTag = $tags;
        $this->setNamedTag($tag);
        return $this;
    }