Exemple #1
0
 public function kill()
 {
     parent::kill();
     foreach ($this->getDrops() as $item) {
         $this->getLevel()->dropItem($this, $item);
     }
 }
Exemple #2
0
 public function spawnTo(Player $player)
 {
     $pk = new AddPaintingPacket();
     $pk->eid = $this->getId();
     $pk->x = $this->x;
     $pk->y = $this->y;
     $pk->z = $this->z;
     $pk->direction = $this->getDirection();
     $pk->title = $this->motive;
     $player->dataPacket($pk);
     parent::spawnTo($player);
 }