mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
20 lines
No EOL
675 B
PHP
20 lines
No EOL
675 B
PHP
<?php
|
|
class Spider extends Monster{
|
|
const TYPE = MOB_SPIDER;
|
|
function __construct(Level $level, $eid, $class, $type = 0, $data = array()){
|
|
$this->setSize(1.4, 0.9);
|
|
parent::__construct($level, $eid, $class, $type, $data);
|
|
$this->setHealth(isset($this->data["Health"]) ? $this->data["Health"] : 8, "generic");
|
|
$this->setName("Spider");
|
|
$this->setSpeed(0.3);
|
|
$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());
|
|
}
|
|
|
|
public function getDrops(){
|
|
return [
|
|
[STRING, 0, mt_rand(0,2)]
|
|
];
|
|
}
|
|
} |