コード例 #1
0
ファイル: Skeleton.php プロジェクト: rilex04/EntityManager
 public function initEntity()
 {
     if (isset($this->namedtag->Health)) {
         $this->setHealth((int) $this->namedtag["Health"]);
     } else {
         $this->setHealth($this->getMaxHealth());
     }
     parent::initEntity();
     $this->created = true;
 }
コード例 #2
0
ファイル: PigZombie.php プロジェクト: rilex04/EntityManager
 public function targetOption(Player $player, $distance)
 {
     return parent::targetOption($player, $distance) && $this->isAngry();
 }
コード例 #3
0
ファイル: Creeper.php プロジェクト: rilex04/EntityManager
 public function saveNBT()
 {
     $this->namedtag->BombTime = new Int("BombTime", $this->bombTime);
     parent::saveNBT();
 }