diff --git a/src/network/mcpe/handler/InGamePacketHandler.php b/src/network/mcpe/handler/InGamePacketHandler.php index 4f5498486..412135728 100644 --- a/src/network/mcpe/handler/InGamePacketHandler.php +++ b/src/network/mcpe/handler/InGamePacketHandler.php @@ -817,23 +817,6 @@ class InGamePacketHandler extends PacketHandler{ return false; //TODO } - public function handleLevelSoundEvent(LevelSoundEventPacket $packet) : bool{ - //TODO: we want to block out this packet completely, but we don't yet know the full scope of sounds that the client sends us from here - switch($packet->sound){ - case LevelSoundEventPacket::SOUND_ATTACK: - case LevelSoundEventPacket::SOUND_ATTACK_NODAMAGE: - case LevelSoundEventPacket::SOUND_ATTACK_STRONG: //TODO: reassess this, seems like the regular attack is never used ?? - case LevelSoundEventPacket::SOUND_HIT: //block punch, maybe entity attack too? - case LevelSoundEventPacket::SOUND_LAND: - case LevelSoundEventPacket::SOUND_FALL: - case LevelSoundEventPacket::SOUND_FALL_SMALL: - case LevelSoundEventPacket::SOUND_FALL_BIG: - return true; - } - $this->player->getWorld()->broadcastPacketToViewers($this->player->getPosition(), $packet); - return true; - } - public function handleNetworkStackLatency(NetworkStackLatencyPacket $packet) : bool{ return true; //TODO: implement this properly - this is here to silence debug spam from MCPE dev builds } diff --git a/src/network/mcpe/protocol/LevelSoundEventPacket.php b/src/network/mcpe/protocol/LevelSoundEventPacket.php index 6c1311a8a..5115f0f9b 100644 --- a/src/network/mcpe/protocol/LevelSoundEventPacket.php +++ b/src/network/mcpe/protocol/LevelSoundEventPacket.php @@ -28,7 +28,7 @@ namespace pocketmine\network\mcpe\protocol; use pocketmine\math\Vector3; use pocketmine\network\mcpe\protocol\serializer\PacketSerializer; -class LevelSoundEventPacket extends DataPacket implements ClientboundPacket, ServerboundPacket{ +class LevelSoundEventPacket extends DataPacket implements ClientboundPacket, GarbageServerboundPacket{ public const NETWORK_ID = ProtocolInfo::LEVEL_SOUND_EVENT_PACKET; public const SOUND_ITEM_USE_ON = 0;