fixed players need to move to pick up dropped items, close #498

This commit is contained in:
Dylan K. Taylor 2017-04-01 19:33:16 +01:00
parent f75cc93160
commit 874afc2fd2

View File

@ -1570,10 +1570,6 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade
}
}
if(!$this->isSpectator()){
$this->checkNearEntities($tickDiff);
}
$this->speed = ($to->subtract($from))->divide($tickDiff);
}elseif($distanceSquared == 0){
$this->speed = new Vector3(0, 0, 0);
@ -1663,7 +1659,10 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade
$this->processMovement($tickDiff);
$this->entityBaseTick($tickDiff);
if(!$this->isSpectator() and $this->speed !== null){
if(!$this->isSpectator()){
$this->checkNearEntities($tickDiff);
if($this->speed !== null){
if($this->onGround){
if($this->inAirTicks !== 0){
$this->startAirTicks = 5;
@ -1679,6 +1678,7 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade
$this->setMotion(new Vector3(0, $expectedVelocity, 0));
}elseif($this->kick("Flying is not enabled on this server")){
$this->timings->stopTiming();
return false;
}
}
@ -1688,6 +1688,7 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade
}
}
}
}
$this->checkTeleportPosition();