saveNBT() public method

public saveNBT ( )
Example #1
0
 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);
     }
 }
Example #2
0
 public function saveNBT()
 {
     parent::saveNBT();
     $this->namedtag->Age = new Short("Age", $this->age);
 }
Example #3
0
 public function saveNBT()
 {
     parent::saveNBT();
     $this->namedtag->Health = new ShortTag("Health", $this->getHealth());
 }
Example #4
0
 public function saveNBT()
 {
     parent::saveNBT();
     $this->namedtag->Fuse = new Byte("Fuse", $this->fuse);
 }
Example #5
0
 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);
     }
 }
Example #6
0
 public function saveNBT()
 {
     parent::saveNBT();
     $this->namedtag->remove = new ByteTag("remove", 1);
     //remove flag
 }
Example #7
0
 public function saveNBT()
 {
     parent::saveNBT();
 }
Example #8
0
 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);
     }
 }