From 4627f0f4e5360181b8715499d0b4e1208db56156 Mon Sep 17 00:00:00 2001 From: Sergittos Date: Sat, 7 Oct 2023 14:45:51 +0200 Subject: [PATCH 01/14] Add fly speed --- src/network/mcpe/NetworkSession.php | 3 +-- src/player/Player.php | 13 +++++++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/network/mcpe/NetworkSession.php b/src/network/mcpe/NetworkSession.php index d0a4c000a3e..1676a1be638 100644 --- a/src/network/mcpe/NetworkSession.php +++ b/src/network/mcpe/NetworkSession.php @@ -930,8 +930,7 @@ public function syncAbilities(Player $for) : void{ ]; $layers = [ - //TODO: dynamic flying speed! FINALLY!!!!!!!!!!!!!!!!! - new AbilitiesLayer(AbilitiesLayer::LAYER_BASE, $boolAbilities, 0.05, 0.1), + new AbilitiesLayer(AbilitiesLayer::LAYER_BASE, $boolAbilities, $for->getFlySpeed(), 0.1), ]; if(!$for->hasBlockCollision()){ //TODO: HACK! In 1.19.80, the client starts falling in our faux spectator mode when it clips into a diff --git a/src/player/Player.php b/src/player/Player.php index 0afa0bffe36..452ebac975e 100644 --- a/src/player/Player.php +++ b/src/player/Player.php @@ -183,6 +183,8 @@ class Player extends Human implements CommandSender, ChunkListener, IPlayer{ private const MAX_REACH_DISTANCE_SURVIVAL = 7; private const MAX_REACH_DISTANCE_ENTITY_INTERACTION = 8; + public const DEFAULT_FLY_SPEED = 0.05; + public const TAG_FIRST_PLAYED = "firstPlayed"; //TAG_Long public const TAG_LAST_PLAYED = "lastPlayed"; //TAG_Long private const TAG_GAME_MODE = "playerGameType"; //TAG_Int @@ -278,6 +280,8 @@ public static function isValidUserName(?string $name) : bool{ protected bool $blockCollision = true; protected bool $flying = false; + protected float $flySpeed = self::DEFAULT_FLY_SPEED; + /** @phpstan-var positive-int|null */ protected ?int $lineHeight = null; protected string $locale = "en_US"; @@ -515,6 +519,15 @@ public function hasAutoJump() : bool{ return $this->autoJump; } + public function setFlySpeed(float $flySpeed) : void{ + $this->flySpeed = $flySpeed; + $this->getNetworkSession()->syncAbilities($this); + } + + public function getFlySpeed() : float{ + return $this->flySpeed; + } + public function spawnTo(Player $player) : void{ if($this->isAlive() && $player->isAlive() && $player->canSee($this) && !$this->isSpectator()){ parent::spawnTo($player); From ba3b1a10c3fdcc8d06ce7d153a9eb5e904471f49 Mon Sep 17 00:00:00 2001 From: Sergittos Date: Sat, 7 Oct 2023 16:06:01 +0200 Subject: [PATCH 02/14] Prevent players from having a negative fly speed --- src/player/Player.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/player/Player.php b/src/player/Player.php index 452ebac975e..85ec6e96dfb 100644 --- a/src/player/Player.php +++ b/src/player/Player.php @@ -520,8 +520,10 @@ public function hasAutoJump() : bool{ } public function setFlySpeed(float $flySpeed) : void{ - $this->flySpeed = $flySpeed; - $this->getNetworkSession()->syncAbilities($this); + if($this->flySpeed !== $flySpeed and $flySpeed >= 0) { + $this->flySpeed = $flySpeed; + $this->getNetworkSession()->syncAbilities($this); + } } public function getFlySpeed() : float{ From 8fe90e93d9088a24d257c7dde1c7d807dcd0b6c3 Mon Sep 17 00:00:00 2001 From: Sergittos Date: Sat, 7 Oct 2023 16:11:52 +0200 Subject: [PATCH 03/14] Fix CS --- src/player/Player.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/player/Player.php b/src/player/Player.php index 85ec6e96dfb..b3d49a37d6c 100644 --- a/src/player/Player.php +++ b/src/player/Player.php @@ -520,7 +520,7 @@ public function hasAutoJump() : bool{ } public function setFlySpeed(float $flySpeed) : void{ - if($this->flySpeed !== $flySpeed and $flySpeed >= 0) { + if($this->flySpeed !== $flySpeed && $flySpeed >= 0){ $this->flySpeed = $flySpeed; $this->getNetworkSession()->syncAbilities($this); } From 30bd1b6ac13c5cc6328680695397a4ed6229c144 Mon Sep 17 00:00:00 2001 From: Sergittos Date: Fri, 19 Jan 2024 18:51:48 +0100 Subject: [PATCH 04/14] Remove unrelated changes of the pull request --- src/item/ItemBlock.php | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/item/ItemBlock.php b/src/item/ItemBlock.php index 015c7847140..11bcb58d372 100644 --- a/src/item/ItemBlock.php +++ b/src/item/ItemBlock.php @@ -24,7 +24,6 @@ namespace pocketmine\item; use pocketmine\block\Block; -use pocketmine\block\BlockTypeIds; use pocketmine\data\runtime\RuntimeDataDescriber; /** @@ -59,12 +58,4 @@ public function isFireProof() : bool{ public function getMaxStackSize() : int{ return $this->block->getMaxStackSize(); } - - public function isNull() : bool{ - //TODO: we really shouldn't need to treat air as a special case here - //this is needed because the "null" empty slot item is represented by an air block, but there's no real reason - //why air should be needed at all. A separate special item type (or actual null) should be used instead, but - //this would cause a lot of BC breaks, so we can't do it yet. - return parent::isNull() || $this->block->getTypeId() === BlockTypeIds::AIR; - } } From 149a70b061faaca48acad66ef5e700789fbeed8e Mon Sep 17 00:00:00 2001 From: Sergittos Date: Fri, 19 Jan 2024 19:06:02 +0100 Subject: [PATCH 05/14] Rename identifiers for better code understanding --- src/network/mcpe/NetworkSession.php | 2 +- src/player/Player.php | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/network/mcpe/NetworkSession.php b/src/network/mcpe/NetworkSession.php index 2d8b6d526f2..8be2cab24e2 100644 --- a/src/network/mcpe/NetworkSession.php +++ b/src/network/mcpe/NetworkSession.php @@ -953,7 +953,7 @@ public function syncAbilities(Player $for) : void{ ]; $layers = [ - new AbilitiesLayer(AbilitiesLayer::LAYER_BASE, $boolAbilities, $for->getFlySpeed(), 0.1), + new AbilitiesLayer(AbilitiesLayer::LAYER_BASE, $boolAbilities, $for->getFlightSpeed(), 0.1), ]; if(!$for->hasBlockCollision()){ //TODO: HACK! In 1.19.80, the client starts falling in our faux spectator mode when it clips into a diff --git a/src/player/Player.php b/src/player/Player.php index bad412715ef..804b1d69e3d 100644 --- a/src/player/Player.php +++ b/src/player/Player.php @@ -183,7 +183,7 @@ class Player extends Human implements CommandSender, ChunkListener, IPlayer{ private const MAX_REACH_DISTANCE_SURVIVAL = 7; private const MAX_REACH_DISTANCE_ENTITY_INTERACTION = 8; - public const DEFAULT_FLY_SPEED = 0.05; + public const DEFAULT_FLIGHT_SPEED = 0.05; public const TAG_FIRST_PLAYED = "firstPlayed"; //TAG_Long public const TAG_LAST_PLAYED = "lastPlayed"; //TAG_Long @@ -280,7 +280,7 @@ public static function isValidUserName(?string $name) : bool{ protected bool $blockCollision = true; protected bool $flying = false; - protected float $flySpeed = self::DEFAULT_FLY_SPEED; + protected float $flightSpeed = self::DEFAULT_FLIGHT_SPEED; /** @phpstan-var positive-int|null */ protected ?int $lineHeight = null; @@ -519,15 +519,15 @@ public function hasAutoJump() : bool{ return $this->autoJump; } - public function setFlySpeed(float $flySpeed) : void{ - if($this->flySpeed !== $flySpeed && $flySpeed >= 0){ - $this->flySpeed = $flySpeed; + public function setFlightSpeed(float $flightSpeed) : void{ + if($this->flightSpeed !== $flightSpeed && $flightSpeed >= 0){ + $this->flightSpeed = $flightSpeed; $this->getNetworkSession()->syncAbilities($this); } } - public function getFlySpeed() : float{ - return $this->flySpeed; + public function getFlightSpeed() : float{ + return $this->flightSpeed; } public function spawnTo(Player $player) : void{ From e269cee6073bb80687eb90ed9ecdf97846702598 Mon Sep 17 00:00:00 2001 From: Sergittos Date: Sat, 30 Mar 2024 03:35:33 +0100 Subject: [PATCH 06/14] Player: Reverse the conditions when setting the flight speed --- src/player/Player.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/player/Player.php b/src/player/Player.php index 1cf64f20a90..88a7f29ca5c 100644 --- a/src/player/Player.php +++ b/src/player/Player.php @@ -520,7 +520,7 @@ public function hasAutoJump() : bool{ } public function setFlightSpeed(float $flightSpeed) : void{ - if($this->flightSpeed !== $flightSpeed && $flightSpeed >= 0){ + if($flightSpeed >= 0 && $this->flightSpeed !== $flightSpeed){ $this->flightSpeed = $flightSpeed; $this->getNetworkSession()->syncAbilities($this); } From db299da4103c2938a11157b2603ce6441110ef92 Mon Sep 17 00:00:00 2001 From: Sergittos Date: Sat, 30 Mar 2024 04:40:39 +0100 Subject: [PATCH 07/14] Why did I delete this --- src/item/ItemBlock.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/item/ItemBlock.php b/src/item/ItemBlock.php index 11bcb58d372..015c7847140 100644 --- a/src/item/ItemBlock.php +++ b/src/item/ItemBlock.php @@ -24,6 +24,7 @@ namespace pocketmine\item; use pocketmine\block\Block; +use pocketmine\block\BlockTypeIds; use pocketmine\data\runtime\RuntimeDataDescriber; /** @@ -58,4 +59,12 @@ public function isFireProof() : bool{ public function getMaxStackSize() : int{ return $this->block->getMaxStackSize(); } + + public function isNull() : bool{ + //TODO: we really shouldn't need to treat air as a special case here + //this is needed because the "null" empty slot item is represented by an air block, but there's no real reason + //why air should be needed at all. A separate special item type (or actual null) should be used instead, but + //this would cause a lot of BC breaks, so we can't do it yet. + return parent::isNull() || $this->block->getTypeId() === BlockTypeIds::AIR; + } } From 549dd6fd9a0696eb47c72209bdb8c5a24f44aa45 Mon Sep 17 00:00:00 2001 From: Sergittos Date: Fri, 14 Jun 2024 17:30:54 +0200 Subject: [PATCH 08/14] Allow players to have a negative fly speed Negative values make the player fly backwards, and this can be used in some game modes --- src/player/Player.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/player/Player.php b/src/player/Player.php index 88a7f29ca5c..49c56f8bb69 100644 --- a/src/player/Player.php +++ b/src/player/Player.php @@ -520,7 +520,7 @@ public function hasAutoJump() : bool{ } public function setFlightSpeed(float $flightSpeed) : void{ - if($flightSpeed >= 0 && $this->flightSpeed !== $flightSpeed){ + if($this->flightSpeed !== $flightSpeed){ $this->flightSpeed = $flightSpeed; $this->getNetworkSession()->syncAbilities($this); } From d037a38b4f912d1a839a3d2565a644d30be20c41 Mon Sep 17 00:00:00 2001 From: IvanCraft623 Date: Tue, 18 Jun 2024 16:35:33 -0500 Subject: [PATCH 09/14] Add some documentation --- src/player/Player.php | 36 +++++++++++++++++++++++++----------- 1 file changed, 25 insertions(+), 11 deletions(-) diff --git a/src/player/Player.php b/src/player/Player.php index 49c56f8bb69..537b2d676e1 100644 --- a/src/player/Player.php +++ b/src/player/Player.php @@ -508,17 +508,14 @@ public function isFlying() : bool{ return $this->flying; } - public function setAutoJump(bool $value) : void{ - if($this->autoJump !== $value){ - $this->autoJump = $value; - $this->getNetworkSession()->syncAdventureSettings(); - } - } - - public function hasAutoJump() : bool{ - return $this->autoJump; - } - + /** + * Sets the player's speed when flying. + * + * If set to zero, the player will not be able to move in the xz plane when flying, and negative values + * will invert the controls. + * + * Note: The value of the movement speed attribute has no effect on the flight speed. + */ public function setFlightSpeed(float $flightSpeed) : void{ if($this->flightSpeed !== $flightSpeed){ $this->flightSpeed = $flightSpeed; @@ -526,10 +523,27 @@ public function setFlightSpeed(float $flightSpeed) : void{ } } + /** + * Returns the player's speed when flying. + * + * If zero, the player is not be able to move in the xz plane when flying, and negative values + * will invert the controls. + */ public function getFlightSpeed() : float{ return $this->flightSpeed; } + public function setAutoJump(bool $value) : void{ + if($this->autoJump !== $value){ + $this->autoJump = $value; + $this->getNetworkSession()->syncAdventureSettings(); + } + } + + public function hasAutoJump() : bool{ + return $this->autoJump; + } + public function spawnTo(Player $player) : void{ if($this->isAlive() && $player->isAlive() && $player->canSee($this) && !$this->isSpectator()){ parent::spawnTo($player); From 9315fd86947e5fb70f99f59b21f3d3e7148d2ef2 Mon Sep 17 00:00:00 2001 From: Sergittos Date: Sat, 20 Jul 2024 14:32:56 +0200 Subject: [PATCH 10/14] Add more documentation --- src/player/Player.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/player/Player.php b/src/player/Player.php index 5c132f7ba62..05c1849a8e0 100644 --- a/src/player/Player.php +++ b/src/player/Player.php @@ -511,10 +511,15 @@ public function isFlying() : bool{ /** * Sets the player's speed when flying. * + * The flight speed is calculated as `blocks per tick = flightSpeed * 10`. For example, setting the + * flight speed to 0.05 means the player will fly at approximately 0.5 blocks per tick. + * * If set to zero, the player will not be able to move in the xz plane when flying, and negative values * will invert the controls. * - * Note: The value of the movement speed attribute has no effect on the flight speed. + * Notes: + * - The value of the movement speed attribute has no effect on the flight speed. + * - When a player sprints while flying, their flight speed is doubled on the client-side. */ public function setFlightSpeed(float $flightSpeed) : void{ if($this->flightSpeed !== $flightSpeed){ @@ -526,6 +531,9 @@ public function setFlightSpeed(float $flightSpeed) : void{ /** * Returns the player's speed when flying. * + * The flight speed is calculated as `blocks per tick = flightSpeed * 10`. For example, if the + * flight speed is set to 0.05, the player will fly at approximately 0.5 blocks per tick. + * * If zero, the player is not be able to move in the xz plane when flying, and negative values * will invert the controls. */ From ec52a3d0dbcd8fb96de3410f121ec83306af04ce Mon Sep 17 00:00:00 2001 From: IvanCraft623 Date: Mon, 2 Sep 2024 11:37:37 -0500 Subject: [PATCH 11/14] CS fix --- src/player/Player.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/player/Player.php b/src/player/Player.php index 05c1849a8e0..0c6c2bf6c3c 100644 --- a/src/player/Player.php +++ b/src/player/Player.php @@ -513,11 +513,11 @@ public function isFlying() : bool{ * * The flight speed is calculated as `blocks per tick = flightSpeed * 10`. For example, setting the * flight speed to 0.05 means the player will fly at approximately 0.5 blocks per tick. - * + * * If set to zero, the player will not be able to move in the xz plane when flying, and negative values * will invert the controls. * - * Notes: + * Notes: * - The value of the movement speed attribute has no effect on the flight speed. * - When a player sprints while flying, their flight speed is doubled on the client-side. */ @@ -531,7 +531,7 @@ public function setFlightSpeed(float $flightSpeed) : void{ /** * Returns the player's speed when flying. * - * The flight speed is calculated as `blocks per tick = flightSpeed * 10`. For example, if the + * The flight speed is calculated as `blocks per tick = flightSpeed * 10`. For example, if the * flight speed is set to 0.05, the player will fly at approximately 0.5 blocks per tick. * * If zero, the player is not be able to move in the xz plane when flying, and negative values From 41f2f48ce042508629096acc39ea5640eb4bd465 Mon Sep 17 00:00:00 2001 From: Sergittos Date: Sun, 5 Jan 2025 15:39:45 +0100 Subject: [PATCH 12/14] Rename from flightSpeed to flightSpeedMultiplier --- src/network/mcpe/NetworkSession.php | 2 +- src/player/Player.php | 22 +++++++++++----------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/network/mcpe/NetworkSession.php b/src/network/mcpe/NetworkSession.php index ade2bf192b4..abd058ad1a6 100644 --- a/src/network/mcpe/NetworkSession.php +++ b/src/network/mcpe/NetworkSession.php @@ -1051,7 +1051,7 @@ public function syncAbilities(Player $for) : void{ ]; $layers = [ - new AbilitiesLayer(AbilitiesLayer::LAYER_BASE, $boolAbilities, $for->getFlightSpeed(), 0.1), + new AbilitiesLayer(AbilitiesLayer::LAYER_BASE, $boolAbilities, $for->getFlightSpeedMultiplier(), 0.1), ]; if(!$for->hasBlockCollision()){ //TODO: HACK! In 1.19.80, the client starts falling in our faux spectator mode when it clips into a diff --git a/src/player/Player.php b/src/player/Player.php index 0c6c2bf6c3c..53c88f27dc7 100644 --- a/src/player/Player.php +++ b/src/player/Player.php @@ -183,7 +183,7 @@ class Player extends Human implements CommandSender, ChunkListener, IPlayer{ private const MAX_REACH_DISTANCE_SURVIVAL = 7; private const MAX_REACH_DISTANCE_ENTITY_INTERACTION = 8; - public const DEFAULT_FLIGHT_SPEED = 0.05; + public const DEFAULT_FLIGHT_SPEED_MULTIPLIER = 0.05; public const TAG_FIRST_PLAYED = "firstPlayed"; //TAG_Long public const TAG_LAST_PLAYED = "lastPlayed"; //TAG_Long @@ -280,7 +280,7 @@ public static function isValidUserName(?string $name) : bool{ protected bool $blockCollision = true; protected bool $flying = false; - protected float $flightSpeed = self::DEFAULT_FLIGHT_SPEED; + protected float $flightSpeedMultiplier = self::DEFAULT_FLIGHT_SPEED_MULTIPLIER; /** @phpstan-var positive-int|null */ protected ?int $lineHeight = null; @@ -511,8 +511,8 @@ public function isFlying() : bool{ /** * Sets the player's speed when flying. * - * The flight speed is calculated as `blocks per tick = flightSpeed * 10`. For example, setting the - * flight speed to 0.05 means the player will fly at approximately 0.5 blocks per tick. + * The flight speed is calculated as `blocks per tick = flightSpeedMultiplier * 10`. For example, setting the + * flight speed multiplier to 0.05 means the player will fly at approximately 0.5 blocks per tick. * * If set to zero, the player will not be able to move in the xz plane when flying, and negative values * will invert the controls. @@ -521,9 +521,9 @@ public function isFlying() : bool{ * - The value of the movement speed attribute has no effect on the flight speed. * - When a player sprints while flying, their flight speed is doubled on the client-side. */ - public function setFlightSpeed(float $flightSpeed) : void{ - if($this->flightSpeed !== $flightSpeed){ - $this->flightSpeed = $flightSpeed; + public function setFlightSpeedMultiplier(float $flightSpeedMultiplier) : void{ + if($this->flightSpeedMultiplier !== $flightSpeedMultiplier){ + $this->flightSpeedMultiplier = $flightSpeedMultiplier; $this->getNetworkSession()->syncAbilities($this); } } @@ -531,14 +531,14 @@ public function setFlightSpeed(float $flightSpeed) : void{ /** * Returns the player's speed when flying. * - * The flight speed is calculated as `blocks per tick = flightSpeed * 10`. For example, if the - * flight speed is set to 0.05, the player will fly at approximately 0.5 blocks per tick. + * The flight speed is calculated as `blocks per tick = flightSpeedMultiplier * 10`. For example, if the + * flight speed multiplier is set to 0.05, the player will fly at approximately 0.5 blocks per tick. * * If zero, the player is not be able to move in the xz plane when flying, and negative values * will invert the controls. */ - public function getFlightSpeed() : float{ - return $this->flightSpeed; + public function getFlightSpeedMultiplier() : float{ + return $this->flightSpeedMultiplier; } public function setAutoJump(bool $value) : void{ From 407afd159ba2a271244d080ce1de163fe6520ce1 Mon Sep 17 00:00:00 2001 From: "Dylan T." Date: Wed, 8 Jan 2025 21:33:58 +0000 Subject: [PATCH 13/14] Update docs --- src/player/Player.php | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/src/player/Player.php b/src/player/Player.php index 16fd63d86ca..329eaff1d35 100644 --- a/src/player/Player.php +++ b/src/player/Player.php @@ -524,17 +524,17 @@ public function isFlying() : bool{ } /** - * Sets the player's speed when flying. + * Sets the player's flight speed multiplier. * - * The flight speed is calculated as `blocks per tick = flightSpeedMultiplier * 10`. For example, setting the - * flight speed multiplier to 0.05 means the player will fly at approximately 0.5 blocks per tick. + * Normal flying speed in blocks-per-tick is (multiplier * 10) blocks per tick. + * When sprint-flying, this is doubled to 20. * - * If set to zero, the player will not be able to move in the xz plane when flying, and negative values - * will invert the controls. + * If set to zero, the player will not be able to move in the xz plane when flying. + * Negative values will invert the controls. * - * Notes: - * - The value of the movement speed attribute has no effect on the flight speed. - * - When a player sprints while flying, their flight speed is doubled on the client-side. + * Note: Movement speed attribute does not influence flight speed. + * + * @see Player::DEFAULT_FLIGHT_SPEED_MULTIPLIER */ public function setFlightSpeedMultiplier(float $flightSpeedMultiplier) : void{ if($this->flightSpeedMultiplier !== $flightSpeedMultiplier){ @@ -544,13 +544,15 @@ public function setFlightSpeedMultiplier(float $flightSpeedMultiplier) : void{ } /** - * Returns the player's speed when flying. + * Returns the player's flight speed multiplier. + * + * Normal flying speed in blocks-per-tick is (multiplier * 10) blocks per tick. + * When sprint-flying, this is doubled to 20. * - * The flight speed is calculated as `blocks per tick = flightSpeedMultiplier * 10`. For example, if the - * flight speed multiplier is set to 0.05, the player will fly at approximately 0.5 blocks per tick. + * If set to zero, the player will not be able to move in the xz plane when flying. + * Negative values will invert the controls. * - * If zero, the player is not be able to move in the xz plane when flying, and negative values - * will invert the controls. + * @see Player::DEFAULT_FLIGHT_SPEED_MULTIPLIER */ public function getFlightSpeedMultiplier() : float{ return $this->flightSpeedMultiplier; From abb079baac27b51180ae08c849768cd428214fc8 Mon Sep 17 00:00:00 2001 From: "Dylan T." Date: Wed, 8 Jan 2025 21:36:38 +0000 Subject: [PATCH 14/14] github web editor don't fuck up indentation, challenge impossible --- src/player/Player.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/player/Player.php b/src/player/Player.php index 329eaff1d35..de40f0abff6 100644 --- a/src/player/Player.php +++ b/src/player/Player.php @@ -545,7 +545,7 @@ public function setFlightSpeedMultiplier(float $flightSpeedMultiplier) : void{ /** * Returns the player's flight speed multiplier. - * + * * Normal flying speed in blocks-per-tick is (multiplier * 10) blocks per tick. * When sprint-flying, this is doubled to 20. *