mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 19:49:44 +00:00
fixed crash
This commit is contained in:
parent
db23411e15
commit
1baafb8b26
2 changed files with 2 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue