Hack for player spawning issue (ref. #1539)

This commit is contained in:
Dylan K. Taylor 2017-11-21 15:20:56 +00:00
parent 74b074753f
commit 808227d9a9

View File

@ -3596,6 +3596,12 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
}
}
public function getOffsetPosition(Vector3 $vector3) : Vector3{
$result = parent::getOffsetPosition($vector3);
$result->y += 0.001; //Hack for MCPE falling underground for no good reason (TODO: find out why it's doing this)
return $result;
}
public function sendPosition(Vector3 $pos, float $yaw = null, float $pitch = null, int $mode = MovePlayerPacket::MODE_NORMAL, array $targets = null){
$yaw = $yaw ?? $this->yaw;
$pitch = $pitch ?? $this->pitch;