当前位置: 首页>>代码示例>>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;未经允许,请勿转载。