mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
creeper will attacc
This commit is contained in:
parent
3c18dc2523
commit
bfc5e2067a
2 changed files with 3 additions and 1 deletions
|
|
@ -3,6 +3,7 @@ class Creeper extends Monster{
|
|||
const TYPE = MOB_CREEPER;
|
||||
const EXPL_TIME = 30;
|
||||
public $timeUntilExplode;
|
||||
public $activatedByPlayer = false;
|
||||
function __construct(Level $level, $eid, $class, $type = 0, $data = []){
|
||||
$this->setSize(0.6, 1.7);
|
||||
parent::__construct($level, $eid, $class, $type, $data);
|
||||
|
|
@ -13,6 +14,7 @@ class Creeper extends Monster{
|
|||
$this->timeUntilExplode = $this->isIgnited() ? self::EXPL_TIME : 0;
|
||||
|
||||
$this->ai->addTask(new TaskRandomWalk(1.0));
|
||||
$this->ai->addTask(new TaskAttackPlayer(1.25, 16));
|
||||
$this->ai->addTask(new TaskLookAround());
|
||||
$this->ai->addTask(new TaskSwimming());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ class Zombie extends Monster{
|
|||
$this->ai->addTask(new TaskRandomWalk(1.0));
|
||||
$this->ai->addTask(new TaskLookAround());
|
||||
$this->ai->addTask(new TaskSwimming());
|
||||
$this->ai->addTask(new TaskAttackPlayer(1.0, 16)); //TODO fix range?
|
||||
$this->ai->addTask(new TaskAttackPlayer(1.0, 16));
|
||||
}
|
||||
|
||||
public function getArmorValue(){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue