Silence more InteractPacket noise

This commit is contained in:
Dylan K. Taylor 2019-02-01 17:47:07 +00:00
parent ad6ae20d6b
commit dbae667dec

View File

@ -284,11 +284,12 @@ class SimpleSessionHandler extends SessionHandler{
} }
public function handleInteract(InteractPacket $packet) : bool{ 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) //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 //due to some messy Mojang hacks, it sends this when changing the held item now, which causes us to think
//hacks, it also sends it when changing the held item now, which causes us to think the inventory was closed //the inventory was closed when it wasn't.
//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 true;
} }
return false; //TODO return false; //TODO