diff --git a/src/pocketmine/Player.php b/src/pocketmine/Player.php index 42f8bcf90..034f1b0dc 100644 --- a/src/pocketmine/Player.php +++ b/src/pocketmine/Player.php @@ -1218,7 +1218,7 @@ class Player extends Human implements CommandSender, InventoryHolder, IPlayer{ $entity->scheduleUpdate(); } - if($entity instanceof Arrow and $entity->onGround and $this->motionX == 0 and $this->motionY == 0 and $this->motionZ == 0){ + if($entity instanceof Arrow and $entity->onGround){ if($entity->dead !== true){ $item = Item::get(Item::ARROW, 0, 1); if($this->isSurvival() and !$this->inventory->canAddItem($item)){ diff --git a/src/pocketmine/entity/Arrow.php b/src/pocketmine/entity/Arrow.php index 2b4712782..e43109707 100644 --- a/src/pocketmine/entity/Arrow.php +++ b/src/pocketmine/entity/Arrow.php @@ -198,7 +198,9 @@ class Arrow extends Projectile{ $flags |= $this->fireTicks > 0 ? 1 : 0; return [ - 0 => ["type" => 0, "value" => $flags] + 0 => ["type" => 0, "value" => $flags], + 1 => ["type" => 1, "value" => $this->airTicks], + 16 => ["type" => 0, "value" => 0] //Is critical ]; } diff --git a/src/pocketmine/entity/Entity.php b/src/pocketmine/entity/Entity.php index f3186626e..1e7fe8a48 100644 --- a/src/pocketmine/entity/Entity.php +++ b/src/pocketmine/entity/Entity.php @@ -29,7 +29,6 @@ use pocketmine\event\entity\EntityDamageEvent; use pocketmine\event\entity\EntityDespawnEvent; use pocketmine\event\entity\EntityLevelChangeEvent; use pocketmine\event\entity\EntityMotionEvent; -use pocketmine\event\entity\EntityMoveEvent; use pocketmine\event\entity\EntityRegainHealthEvent; use pocketmine\event\entity\EntitySpawnEvent; use pocketmine\event\entity\EntityTeleportEvent;