diff --git a/src/entity/ai/tasks/TaskDestroyServerPerformance.php b/src/entity/ai/tasks/TaskDestroyServerPerformance.php index 790f42ac..f0b6b40d 100644 --- a/src/entity/ai/tasks/TaskDestroyServerPerformance.php +++ b/src/entity/ai/tasks/TaskDestroyServerPerformance.php @@ -16,7 +16,7 @@ class TaskDestroyServerPerformance extends TaskTempt public function onUpdate(EntityAI $ai) { - if(!($this->target instanceof Entity) || ($ai->entity instanceof Spider && $ai->entity->level->isDay()) || ($this->target instanceof Entity && !$this->target->isPlayer()) || (Utils::distance_noroot($this->target, $ai->entity) > 256) || $this->target->level->getName() != $ai->entity->level->getName()){ + if(!($this->target instanceof Entity) || ($this->target instanceof Entity && !$this->target->isPlayer()) || (Utils::distance_noroot($this->target, $ai->entity) > 256) || $this->target->level->getName() != $ai->entity->level->getName()){ $this->reset(); return; } diff --git a/src/material/block/solid/LeavesBlock.php b/src/material/block/solid/LeavesBlock.php index 4eaa38f8..60d4dfbf 100644 --- a/src/material/block/solid/LeavesBlock.php +++ b/src/material/block/solid/LeavesBlock.php @@ -30,7 +30,7 @@ class LeavesBlock extends TransparentBlock{ return true; } - if($block->getId() === LEAVES && $distance <= 4){ + if($block === LEAVES && $distance <= 4){ if(self::findLog($level, $x - 1, $y, $z, $visited, $distance + 1)) return true; if(self::findLog($level, $x + 1, $y, $z, $visited, $distance + 1)) return true; if(self::findLog($level, $x, $y, $z - 1, $visited, $distance + 1)) return true;