diff --git a/src/pocketmine/Player.php b/src/pocketmine/Player.php index bb2ad190d..82811922b 100644 --- a/src/pocketmine/Player.php +++ b/src/pocketmine/Player.php @@ -1143,7 +1143,7 @@ class Player extends Human implements CommandSender, InventoryHolder, IPlayer{ $pk = new MovePlayerPacket; $pk->eid = 0; $pk->x = $from->x; - $pk->y = $from->y + $this->getEyeHeight(); + $pk->y = $from->y + $this->getEyeHeight() + 0.01; $pk->z = $from->z; $pk->bodyYaw = $from->yaw; $pk->pitch = $from->pitch; @@ -1477,7 +1477,7 @@ class Player extends Human implements CommandSender, InventoryHolder, IPlayer{ $pk = new MovePlayerPacket(); $pk->eid = 0; $pk->x = $this->x; - $pk->y = $this->y + $this->getEyeHeight(); + $pk->y = $this->y + $this->getEyeHeight() + 0.01; $pk->z = $this->z; $pk->bodyYaw = $this->yaw; $pk->pitch = $this->pitch; @@ -2540,7 +2540,7 @@ class Player extends Human implements CommandSender, InventoryHolder, IPlayer{ $pk = new MovePlayerPacket; $pk->eid = 0; $pk->x = $this->x; - $pk->y = $this->y + $this->getEyeHeight(); + $pk->y = $this->y + $this->getEyeHeight() + 0.01; $pk->z = $this->z; $pk->bodyYaw = $this->yaw; $pk->pitch = $this->pitch; diff --git a/src/pocketmine/entity/FallingBlock.php b/src/pocketmine/entity/FallingBlock.php index e18581603..250777810 100644 --- a/src/pocketmine/entity/FallingBlock.php +++ b/src/pocketmine/entity/FallingBlock.php @@ -126,7 +126,7 @@ class FallingBlock extends Entity{ $this->updateMovement(); } - return $hasUpdate or !$this->onGround or ($this->motionX == 0 and $this->motionY == 0 and $this->motionZ == 0); + return $hasUpdate or !$this->onGround or $this->motionX != 0 or $this->motionY != 0 or $this->motionZ != 0; } public function getBlock(){ diff --git a/src/pocketmine/entity/PrimedTNT.php b/src/pocketmine/entity/PrimedTNT.php index 160da00bc..d1e871132 100644 --- a/src/pocketmine/entity/PrimedTNT.php +++ b/src/pocketmine/entity/PrimedTNT.php @@ -116,7 +116,7 @@ class PrimedTNT extends Entity implements Explosive{ } - return $hasUpdate or $this->fuse > 0 or ($this->motionX == 0 and $this->motionY == 0 and $this->motionZ == 0); + return $hasUpdate or $this->fuse >= 0 or $this->motionX != 0 or $this->motionY != 0 or $this->motionZ != 0; } public function attack($damage, $source = EntityDamageEvent::CAUSE_MAGIC){