mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 12:09:43 +00:00
fixed setHealth, small tweaks to ranged attack
This commit is contained in:
parent
207a055f9b
commit
2bf7564bd7
3 changed files with 26 additions and 21 deletions
|
|
@ -1,7 +1,5 @@
|
|||
<?php
|
||||
|
||||
use EntityAI;
|
||||
|
||||
class TaskRangedAttack extends \TaskBase
|
||||
{
|
||||
public $server;
|
||||
|
|
@ -43,6 +41,8 @@ class TaskRangedAttack extends \TaskBase
|
|||
|
||||
if($dist > 100){
|
||||
$ai->mobController->setMovingTarget($ai->entity->target->x, $ai->entity->target->y, $ai->entity->target->z, $this->speedMultiplier);
|
||||
}else{
|
||||
$ai->mobController->headYawIsYaw = true;
|
||||
}
|
||||
|
||||
$ai->mobController->setLookPosition($ai->entity->target->x, $ai->entity->target->y + 0.12, $ai->entity->target->z, 10, $ai->entity->getVerticalFaceSpeed());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue