mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-02 08:13:10 +00:00
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:
parent
c747c7d025
commit
43a0ede9d2
@ -1165,6 +1165,7 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$pos = $pos->floor();
|
||||||
$b = $this->level->getBlock($pos);
|
$b = $this->level->getBlock($pos);
|
||||||
|
|
||||||
$this->server->getPluginManager()->callEvent($ev = new PlayerBedEnterEvent($this, $b));
|
$this->server->getPluginManager()->callEvent($ev = new PlayerBedEnterEvent($this, $b));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user