mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 12:09:43 +00:00
Update EntityAPI.php
This commit is contained in:
parent
7ea63bdceb
commit
83b7bc4b39
11 changed files with 380 additions and 57 deletions
|
|
@ -5,7 +5,7 @@ class TaskLookAround extends TaskBase
|
|||
private $finYaw = 0;
|
||||
public function shouldBeExecuted(EntityAI $ai)
|
||||
{
|
||||
return !$ai->entity->isMoving() && $ai->entity->lookTime <= 0 && mt_rand(0,30) == 1 && $ai->entity->idleTime <= 0;
|
||||
return !$ai->entity->isMoving() && $ai->entity->lookTime <= 0 && mt_rand(0,30) == 1 && $ai->entity->idleTime <= 0 && !($ai->lastTask instanceof TaskLookAround);
|
||||
}
|
||||
|
||||
public function wasExecuted(EntityAI $ai){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue