本文整理汇总了PHP中pocketmine\entity\Entity::saveNBT方法的典型用法代码示例。如果您正苦于以下问题:PHP Entity::saveNBT方法的具体用法?PHP Entity::saveNBT怎么用?PHP Entity::saveNBT使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pocketmine\entity\Entity
的用法示例。
在下文中一共展示了Entity::saveNBT方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: saveNBT
public function saveNBT()
{
parent::saveNBT();
$this->namedtag->Item = NBT::putItemHelper($this->item);
$this->namedtag->Health = new Short("Health", $this->getHealth());
$this->namedtag->Age = new Short("Age", $this->age);
$this->namedtag->PickupDelay = new Short("PickupDelay", $this->pickupDelay);
if ($this->owner !== null) {
$this->namedtag->Owner = new String("Owner", $this->owner);
}
if ($this->thrower !== null) {
$this->namedtag->Thrower = new String("Thrower", $this->thrower);
}
}
示例2: saveNBT
public function saveNBT()
{
parent::saveNBT();
$this->namedtag->Age = new Short("Age", $this->age);
}
示例3: saveNBT
public function saveNBT()
{
parent::saveNBT();
$this->namedtag->Health = new ShortTag("Health", $this->getHealth());
}
示例4: saveNBT
public function saveNBT()
{
parent::saveNBT();
$this->namedtag->Fuse = new Byte("Fuse", $this->fuse);
}
示例5: saveNBT
public function saveNBT()
{
parent::saveNBT();
$this->namedtag->Item = new Compound("Item", ["id" => new Short("id", $this->item->getId()), "Damage" => new Short("Damage", $this->item->getDamage()), "Count" => new Byte("Count", $this->item->getCount())]);
$this->namedtag->Health = new Short("Health", $this->getHealth());
$this->namedtag->Age = new Short("Age", $this->age);
$this->namedtag->PickupDelay = new Short("PickupDelay", $this->pickupDelay);
if ($this->owner !== \null) {
$this->namedtag->Owner = new String("Owner", $this->owner);
}
if ($this->thrower !== \null) {
$this->namedtag->Thrower = new String("Thrower", $this->thrower);
}
}
示例6: saveNBT
public function saveNBT()
{
parent::saveNBT();
$this->namedtag->remove = new ByteTag("remove", 1);
//remove flag
}
示例7: saveNBT
public function saveNBT()
{
parent::saveNBT();
}
示例8: saveNBT
public function saveNBT()
{
parent::saveNBT();
$this->namedtag->Item = $this->item->nbtSerialize();
$this->namedtag->Health = new ShortTag("Health", $this->getHealth());
$this->namedtag->Age = new ShortTag("Age", $this->age);
$this->namedtag->PickupDelay = new ShortTag("PickupDelay", $this->pickupDelay);
if ($this->owner !== null) {
$this->namedtag->Owner = new StringTag("Owner", $this->owner);
}
if ($this->thrower !== null) {
$this->namedtag->Thrower = new StringTag("Thrower", $this->thrower);
}
}