當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Entity::saveNBT方法代碼示例

本文整理匯總了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);
     }
 }
開發者ID:orlando092,項目名稱:ImagicalMine,代碼行數:14,代碼來源:Item.php

示例2: saveNBT

 public function saveNBT()
 {
     parent::saveNBT();
     $this->namedtag->Age = new Short("Age", $this->age);
 }
開發者ID:TylerGames,項目名稱:PocketMine-MP,代碼行數:5,代碼來源:Projectile.php

示例3: saveNBT

 public function saveNBT()
 {
     parent::saveNBT();
     $this->namedtag->Health = new ShortTag("Health", $this->getHealth());
 }
開發者ID:ianju,項目名稱:PocketMine-MP,代碼行數:5,代碼來源:Living.php

示例4: saveNBT

 public function saveNBT()
 {
     parent::saveNBT();
     $this->namedtag->Fuse = new Byte("Fuse", $this->fuse);
 }
開發者ID:kiyoshi-kurosaki,項目名稱:ClearSky,代碼行數:5,代碼來源:PrimedTNT.php

示例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);
     }
 }
開發者ID:Cybertechpp,項目名稱:Steadfast2,代碼行數:14,代碼來源:Item.php

示例6: saveNBT

 public function saveNBT()
 {
     parent::saveNBT();
     $this->namedtag->remove = new ByteTag("remove", 1);
     //remove flag
 }
開發者ID:MrDoni98,項目名稱:PocketMine-MP-Plugins,代碼行數:6,代碼來源:Chair.php

示例7: saveNBT

 public function saveNBT()
 {
     parent::saveNBT();
 }
開發者ID:ClearSkyTeam,項目名稱:ClearSky,代碼行數:4,代碼來源:Living.php

示例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);
     }
 }
開發者ID:robske110,項目名稱:ClearSky,代碼行數:14,代碼來源:Item.php


注:本文中的pocketmine\entity\Entity::saveNBT方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。