fixed crash when shooting an arrow

This commit is contained in:
GameHerobrine 2024-03-15 22:45:42 +03:00
parent 0f43decef5
commit 7ebb5a4a63
3 changed files with 2 additions and 3 deletions

View file

@ -39,7 +39,6 @@ class TaskEatTileGoal extends TaskBase
return ($idm[0] === TALL_GRASS && $idm[1] === 1) || $idb === GRASS;
}
return false;
//this.theEntity.getRNG().nextInt(this.theEntity.isChild() ? 50 : 1000) != 0
}
}

View file

@ -30,9 +30,9 @@ class TaskRandomWalk extends TaskBase
$this->reset();
return false; //TODO Better way: block movement
}
--$this->selfCounter;
$ai->mobController->setMovingOffset($this->x, 0, $this->z, $this->speedMultiplier);
//TODO fix $ai->mobController->moveNonInstant($this->x, 0, $this->z);
}
public function canBeExecuted(EntityAI $ai)

View file

@ -49,7 +49,7 @@ class Arrow extends Projectile{
$this->yaw = (atan2($d, $d2) * 180) / M_PI;
$this->pitch = (atan2($d1, $f3) * 180) / M_PI;
$this->updatePosition();
$this->update();
//$this->update();
//TODO i guess? $ticksInGround = 0;
}
public function sendMoveUpdate()