コード例 #1
0
 public function targetOption(Creature $creature, float $distance) : bool
 {
     if ($creature instanceof Player) {
         return $creature->spawned && $creature->isAlive() && !$creature->closed && $creature->getInventory()->getItemInHand()->getId() == Item::WHEAT && $distance <= 49;
     }
     return false;
 }
コード例 #2
0
 public function targetOption(Creature $creature, float $distance) : bool
 {
     if (!$creature instanceof Player) {
         return $creature->isAlive() && $distance <= 60;
     }
     return false;
 }
コード例 #3
0
 public function targetOption(Creature $creature, float $distance) : bool
 {
     if ($creature instanceof Player) {
         return $creature->spawned && $creature->isAlive() && !$creature->closed && $creature->isSurvival() && $distance <= 200;
     }
     return $creature->isAlive() && !$creature->closed && $distance <= 200;
 }