From 695f9f1484622b700904c6888462fc545282a3f2 Mon Sep 17 00:00:00 2001 From: GameHerobrine Date: Mon, 30 Jan 2023 13:54:13 +0300 Subject: [PATCH] ai will stop executing if entity is ded --- src/entity/Living.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/entity/Living.php b/src/entity/Living.php index 6aa61a0d..faf99cc0 100644 --- a/src/entity/Living.php +++ b/src/entity/Living.php @@ -30,7 +30,7 @@ abstract class Living extends Entity implements Damageable, Pathfindable{ } public function update(){ - if(Entity::$allowedAI && $this->idleTime <= 0) { + if(!$this->dead && Entity::$allowedAI && $this->idleTime <= 0) { $this->ai->updateTasks(); } if($this->onGround){