mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 19:49:44 +00:00
php8 explosion fixes
This commit is contained in:
parent
2cdf3ca8da
commit
6086c80dad
3 changed files with 17 additions and 3 deletions
|
|
@ -18,6 +18,8 @@ class EntityAI
|
|||
|
||||
public $lastTask;
|
||||
|
||||
public $counter = 0;
|
||||
|
||||
public function __construct($entity){
|
||||
$this->entity = $entity;
|
||||
$this->tasks = [];
|
||||
|
|
@ -47,6 +49,9 @@ class EntityAI
|
|||
}
|
||||
|
||||
public function updateTasks(){
|
||||
if($this->counter % 3 != 0){
|
||||
return;
|
||||
}
|
||||
foreach($this->tasks as $t){
|
||||
if(!$t->isStarted && $t->canBeExecuted($this)){
|
||||
$t->isStarted = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue