diff --git a/src/pocketmine/Player.php b/src/pocketmine/Player.php index 63cf8d5d07..2dc3a4371e 100644 --- a/src/pocketmine/Player.php +++ b/src/pocketmine/Player.php @@ -1121,7 +1121,11 @@ class Player extends Human implements CommandSender, InventoryHolder, IPlayer{ $revert = true; //$this->server->getLogger()->warning($this->getName()." moved wrongly!"); }elseif($diff > 0){ - $revert = !$this->setPosition($this->newPosition); + $this->x = $this->newPosition->x; + $this->y = $this->newPosition->y; + $this->z = $this->newPosition->z; + $radius = $this->width / 2; + $this->boundingBox->setBounds($this->x - $radius, $this->y + $this->ySize, $this->z - $radius, $this->x + $radius, $this->y + $this->height + $this->ySize, $this->z + $radius); } } } diff --git a/src/pocketmine/entity/Entity.php b/src/pocketmine/entity/Entity.php index 7476b147ab..5a6b799606 100644 --- a/src/pocketmine/entity/Entity.php +++ b/src/pocketmine/entity/Entity.php @@ -1037,7 +1037,7 @@ abstract class Entity extends Position implements Metadatable{ } public function setPosition(Vector3 $pos, $force = false){ - if($pos instanceof Position and $pos->getLevel() instanceof Level and $pos->getLevel() !== $this->getLevel()){ + if($pos instanceof Position and $pos->level instanceof Level and $pos->level !== $this->level){ if($this->switchLevel($pos->getLevel()) === false){ return false; }