Player: Fix floating-point errors when float Vector3s are given to sleepOn()

In the future this will change to block positions and the Vector3 issue will cease to be an issue.

Closes #1871
This commit is contained in:
Dylan K. Taylor 2018-01-02 16:09:58 +00:00
parent c747c7d025
commit 43a0ede9d2

View File

@ -1165,6 +1165,7 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
return false;
}
$pos = $pos->floor();
$b = $this->level->getBlock($pos);
$this->server->getPluginManager()->callEvent($ev = new PlayerBedEnterEvent($this, $b));