NostalgiaCore/src/entity/monster/PigZombie.php
2022-11-01 00:55:49 +03:00

19 lines
No EOL
515 B
PHP

<?php
class PigZombie extends Monster{
const TYPE = MOB_PIGMAN;
function __construct(Level $level, $eid, $class, $type = 0, $data = []){
parent::__construct($level, $eid, $class, $type, $data);
$this->setHealth(isset($this->data["Health"]) ? $this->data["Health"] : 12, "generic");
$this->setSize(0.3, 1.95);
$this->setName("Pigman");
$this->setSpeed(0.25);
$this->update();
}
public function getDrops(){
return [
[COOKED_PORKCHOP, 0, mt_rand(0,2)],
[GOLD_INGOT, 0, mt_rand(0,1)]
];
}
}