mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 12:09:43 +00:00
fixed spider and pigman ai
This commit is contained in:
parent
8b47cf1b66
commit
c2e53d91c2
4 changed files with 5 additions and 6 deletions
|
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
class PigZombie extends Monster{
|
||||
class PigZombie extends Monster{ //TODO extends zombie
|
||||
const TYPE = MOB_PIGMAN;
|
||||
function __construct(Level $level, $eid, $class, $type = 0, $data = []){
|
||||
$this->setSize(0.3, 1.95);
|
||||
|
|
@ -11,6 +11,7 @@ class PigZombie extends Monster{
|
|||
$this->ai->addTask(new TaskLookAround());
|
||||
$this->ai->addTask(new TaskRandomWalk(1.0));
|
||||
$this->ai->addTask(new TaskSwimming());
|
||||
$this->ai->addTask(new TaskAttackPlayer(1.0, 16)); //TODO fix range?
|
||||
}
|
||||
public function getAttackDamage(){
|
||||
return 5;
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ class Spider extends Monster{
|
|||
$this->ai->addTask(new TaskRandomWalk(1.0)); //TODO this mob doesnt use newAI -> speed is not correct
|
||||
$this->ai->addTask(new TaskLookAround()); //TODO this mob doesnt use newAI
|
||||
$this->ai->addTask(new TaskSwimming());
|
||||
$this->ai->addTask(new TaskAttackPlayer(1.0, 16)); //TODO fix range?
|
||||
}
|
||||
|
||||
public function getDrops(){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue