mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 20:19:44 +00:00
fixed inability to collect entity drop, fixed player not getting damage while standing on cactus, tweaked some other stuff
This commit is contained in:
parent
46efebaf67
commit
19a4008543
6 changed files with 11 additions and 10 deletions
|
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
//TODO mutexBits
|
||||
|
||||
abstract class TaskBase
|
||||
{
|
||||
public $isStarted = false, $selfCounter = 0;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue