entity damage by blocks was a bit rewritten, fixed packet spam by burning zombies/entities, fire tweaks

This commit is contained in:
GameHerobrine 2024-03-16 00:29:33 +03:00
parent 7ebb5a4a63
commit f078e83528
6 changed files with 87 additions and 93 deletions

View file

@ -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);
}
}