From dbae667dec733a8db2d72810c321cc70a2fd2e62 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Fri, 1 Feb 2019 17:47:07 +0000 Subject: [PATCH] Silence more InteractPacket noise --- .../network/mcpe/handler/SimpleSessionHandler.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/pocketmine/network/mcpe/handler/SimpleSessionHandler.php b/src/pocketmine/network/mcpe/handler/SimpleSessionHandler.php index 925eb334a..81e44e3ca 100644 --- a/src/pocketmine/network/mcpe/handler/SimpleSessionHandler.php +++ b/src/pocketmine/network/mcpe/handler/SimpleSessionHandler.php @@ -284,11 +284,12 @@ class SimpleSessionHandler extends SessionHandler{ } public function handleInteract(InteractPacket $packet) : bool{ - if($packet->action === InteractPacket::ACTION_MOUSEOVER and $packet->target === 0){ + if($packet->action === InteractPacket::ACTION_MOUSEOVER){ //TODO HACK: silence useless spam (MCPE 1.8) - //this packet is EXPECTED to only be sent when interacting with an entity, but due to some messy Mojang - //hacks, it also sends it when changing the held item now, which causes us to think the inventory was closed - //when it wasn't. + //due to some messy Mojang hacks, it sends this when changing the held item now, which causes us to think + //the inventory was closed when it wasn't. + //this is also sent whenever entity metadata updates, which can get really spammy. + //TODO: implement handling for this where it matters return true; } return false; //TODO