mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 00:33:59 +00:00
MovingObjectPosition: Use asVector3() instead of creating a new vector the hard way
This commit is contained in:
parent
dda71b06ae
commit
c64b9ad63a
@ -73,7 +73,7 @@ class MovingObjectPosition{
|
||||
$ob->blockY = $y;
|
||||
$ob->blockZ = $z;
|
||||
$ob->sideHit = $side;
|
||||
$ob->hitVector = new Vector3($hitVector->x, $hitVector->y, $hitVector->z);
|
||||
$ob->hitVector = $hitVector->asVector3();
|
||||
return $ob;
|
||||
}
|
||||
|
||||
@ -86,7 +86,7 @@ class MovingObjectPosition{
|
||||
$ob = new MovingObjectPosition;
|
||||
$ob->typeOfHit = self::TYPE_ENTITY_COLLISION;
|
||||
$ob->entityHit = $entity;
|
||||
$ob->hitVector = new Vector3($entity->x, $entity->y, $entity->z);
|
||||
$ob->hitVector = $entity->asVector3();
|
||||
return $ob;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user