mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 03:59:43 +00:00
fixed rangedattack spawning arrow with wrong y pos
This commit is contained in:
parent
a8f504ad88
commit
0c6bf7648f
2 changed files with 2 additions and 3 deletions
|
|
@ -68,7 +68,7 @@ class TaskRangedAttack extends \TaskBase
|
|||
$arrow = $this->server->api->entity->add($selfEntity->level, ENTITY_OBJECT, OBJECT_ARROW, $d);
|
||||
$arrow->shotByEntity = true;
|
||||
$arrow->shooterEID = $selfEntity->eid;
|
||||
$posY = ($target->y + $target->getEyeHeight() - 0.1);
|
||||
$posY = ($selfEntity->y + $selfEntity->getEyeHeight() - 0.1);
|
||||
$diffX = $target->x - $selfEntity->x;
|
||||
$diffY = ($target->boundingBox->minY + ($target->height / 3)) - $posY;
|
||||
$diffZ = $target->z - $selfEntity->z;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue