From 4caa2c7690464d1be77f53294f6644087f8e3e39 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Sat, 6 May 2023 15:54:11 +0100 Subject: [PATCH] NetworkSession: send FLYING flag on spectator ability layer fixes #5722 I'm not very clear why this works. PM doesn't use real spectator mode yet (we're still using the faux spectator mode PM has had for years, because I haven't yet assessed how real spectator mode will affect stuff like block interactions), so this ability layer shouldn't have any effect. thank you @Alemiz112 --- src/network/mcpe/NetworkSession.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/network/mcpe/NetworkSession.php b/src/network/mcpe/NetworkSession.php index bff5875b7..1b90547e7 100644 --- a/src/network/mcpe/NetworkSession.php +++ b/src/network/mcpe/NetworkSession.php @@ -894,6 +894,12 @@ class NetworkSession{ [ //TODO: dynamic flying speed! FINALLY!!!!!!!!!!!!!!!!! new AbilitiesLayer(AbilitiesLayer::LAYER_BASE, $boolAbilities, 0.05, 0.1), + + //TODO: HACK! In 1.19.80, the client starts falling in our faux spectator mode when it clips into a + //block. I have no idea why this works, since we don't actually use the real spectator mode. + new AbilitiesLayer(AbilitiesLayer::LAYER_SPECTATOR, [ + AbilitiesLayer::ABILITY_FLYING => true, + ], null, null) ] ))); }