Player: fixed draining hunger when teleporting

this was caused by abe5d94d5b42ecc436fadfcf4786128bcb550ea4 because player's lastBlah wasn't getting updated anymore.

Player movement handling really needs cleaning up, but for now this fixes the issue.
This commit is contained in:
Dylan K. Taylor 2018-03-08 12:18:22 +00:00
parent 1f77c074e9
commit ea5db98d12

View File

@ -3692,6 +3692,10 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
$this->isTeleporting = true;
//TODO: workaround for player last pos not getting updated
//Entity::updateMovement() normally handles this, but it's overridden with an empty function in Player
$this->resetLastMovements();
return true;
}