本文整理匯總了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);
}
}