mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 20:19:44 +00:00
entity damage by blocks was a bit rewritten, fixed packet spam by burning zombies/entities, fire tweaks
This commit is contained in:
parent
7ebb5a4a63
commit
f078e83528
6 changed files with 87 additions and 93 deletions
|
|
@ -7,7 +7,7 @@ class PigZombie extends Monster{ //TODO extends zombie
|
|||
$this->setHealth(isset($this->data["Health"]) ? $this->data["Health"] : 12, "generic");
|
||||
$this->setName("Pigman");
|
||||
$this->setSpeed(0.25);
|
||||
|
||||
$this->isImmuneToFire = true;
|
||||
$this->ai->addTask(new TaskLookAround());
|
||||
$this->ai->addTask(new TaskRandomWalk(1.0));
|
||||
$this->ai->addTask(new TaskSwimming());
|
||||
|
|
@ -22,12 +22,4 @@ class PigZombie extends Monster{ //TODO extends zombie
|
|||
[GOLD_INGOT, 0, mt_rand(0,1)]
|
||||
];
|
||||
}
|
||||
|
||||
public function harm($dmg, $cause = "generic", $force = false)
|
||||
{
|
||||
if($cause === "fire" || $cause === "lava" || $cause === "burning"){
|
||||
return false;
|
||||
}
|
||||
return parent::harm($dmg, $cause, $force);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue