mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39: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
|
|
@ -1877,9 +1877,8 @@ class Player{
|
|||
$this->entity->setPosition($newPos, $packet->yaw, $packet->pitch, $packet->bodyYaw);
|
||||
}
|
||||
$this->entity->updateAABB();
|
||||
}else{
|
||||
console("skipping movement packet");
|
||||
}
|
||||
|
||||
break;
|
||||
case ProtocolInfo::PLAYER_EQUIPMENT_PACKET:
|
||||
if($this->spawned === false){
|
||||
|
|
|
|||
|
|
@ -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