mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-27 13:49:55 +00:00
Fixed a few issues
This commit is contained in:
parent
66b58e36a1
commit
1ddd58fd3b
@ -1130,7 +1130,7 @@ class Player extends Human implements CommandSender, InventoryHolder, IPlayer{
|
||||
$this->teleport($ev->getTo());
|
||||
}else{
|
||||
foreach($this->hasSpawned as $player){
|
||||
$player->addEntityMovement($this->id, $this->x, $this->y + $this->height, $this->z, $this->yaw, $this->pitch, $this->yaw);
|
||||
$player->addEntityMovement($this->id, $this->x, $this->y + $this->getEyeHeight(), $this->z, $this->yaw, $this->pitch, $this->yaw);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1153,7 +1153,7 @@ class Player extends Human implements CommandSender, InventoryHolder, IPlayer{
|
||||
$pk = new MovePlayerPacket();
|
||||
$pk->eid = $this->getId();
|
||||
$pk->x = $from->x;
|
||||
$pk->y = $from->y + $this->height;
|
||||
$pk->y = $from->y + $this->getEyeHeight();
|
||||
$pk->z = $from->z;
|
||||
$pk->bodyYaw = $from->yaw;
|
||||
$pk->pitch = $from->pitch;
|
||||
@ -1527,7 +1527,7 @@ class Player extends Human implements CommandSender, InventoryHolder, IPlayer{
|
||||
$pk = new MovePlayerPacket();
|
||||
$pk->eid = $this->getId();
|
||||
$pk->x = $this->forceMovement->x;
|
||||
$pk->y = $this->forceMovement->y + $this->height;
|
||||
$pk->y = $this->forceMovement->y + $this->getEyeHeight();
|
||||
$pk->z = $this->forceMovement->z;
|
||||
$pk->bodyYaw = $packet->bodyYaw;
|
||||
$pk->pitch = $packet->pitch;
|
||||
@ -2699,7 +2699,7 @@ class Player extends Human implements CommandSender, InventoryHolder, IPlayer{
|
||||
$pk = new MovePlayerPacket();
|
||||
$pk->eid = $this->getId();
|
||||
$pk->x = $this->x;
|
||||
$pk->y = $this->y + $this->height;
|
||||
$pk->y = $this->y + $this->getEyeHeight();
|
||||
$pk->z = $this->z;
|
||||
$pk->bodyYaw = $this->yaw;
|
||||
$pk->pitch = $this->pitch;
|
||||
|
@ -795,7 +795,7 @@ abstract class Entity extends Location implements Metadatable{
|
||||
|
||||
if(!($this instanceof Player)){
|
||||
foreach($this->hasSpawned as $player){
|
||||
$player->addEntityMovement($this->id, $this->x, $this->y + $this->height, $this->z, $this->yaw, $this->pitch, $this->yaw);
|
||||
$player->addEntityMovement($this->id, $this->x, $this->y + $this->getEyeHeight(), $this->z, $this->yaw, $this->pitch, $this->yaw);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1396,7 +1396,7 @@ abstract class Entity extends Location implements Metadatable{
|
||||
$this->lastPitch = $this->pitch;
|
||||
|
||||
foreach($this->hasSpawned as $player){
|
||||
$player->addEntityMovement($this->getId(), $this->x, $this->y + $this->height, $this->z, $this->yaw, $this->pitch, $this->yaw);
|
||||
$player->addEntityMovement($this->getId(), $this->x, $this->y + $this->getEyeHeight(), $this->z, $this->yaw, $this->pitch, $this->yaw);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
@ -82,6 +82,8 @@ class FloatingTextParticle extends Particle{
|
||||
$pk->pitch = 0;
|
||||
$pk->item = 0;
|
||||
$pk->meta = 0;
|
||||
$pk->slim = false;
|
||||
$pk->skin = str_repeat("\x00", 64 * 32 * 4);
|
||||
$pk->metadata = [
|
||||
Entity::DATA_FLAGS => [Entity::DATA_TYPE_BYTE, 1 << Entity::DATA_FLAG_INVISIBLE],
|
||||
Entity::DATA_AIR => [Entity::DATA_TYPE_SHORT, 300],
|
||||
|
Loading…
x
Reference in New Issue
Block a user