fixed inability to collect entity drop, fixed player not getting damage while standing on cactus, tweaked some other stuff

This commit is contained in:
GameHerobrine 2024-11-23 05:35:41 +03:00
parent 46efebaf67
commit 19a4008543
6 changed files with 11 additions and 10 deletions

View file

@ -1,5 +1,5 @@
<?php
//TODO mutexBits
abstract class TaskBase
{
public $isStarted = false, $selfCounter = 0;

View file

@ -27,7 +27,7 @@ class TaskLookAtPlayer extends TaskBase{
}
public function onUpdate(EntityAI $ai){
if(!($this->target instanceof Entity) || Utils::distance($ai->entity, $this->target) > 6 || $this->target->level->getName() != $ai->entity->level->getName()){ //TODO max distance for different mobs
if(!($this->target instanceof Entity) || Utils::distance($ai->entity, $this->target) > $this->distance || $this->target->level->getName() != $ai->entity->level->getName()){
$this->reset();
$this->onEnd($ai);
return;