mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-23 00:55:57 +00:00
Silence LevelSoundEventPacket noise
This commit is contained in:
parent
4f4069d403
commit
6845cbb2b3
@ -62,6 +62,7 @@ use pocketmine\network\mcpe\protocol\InteractPacket;
|
||||
use pocketmine\network\mcpe\protocol\InventoryTransactionPacket;
|
||||
use pocketmine\network\mcpe\protocol\ItemFrameDropItemPacket;
|
||||
use pocketmine\network\mcpe\protocol\LabTablePacket;
|
||||
use pocketmine\network\mcpe\protocol\LevelSoundEventPacket;
|
||||
use pocketmine\network\mcpe\protocol\LevelSoundEventPacketV1;
|
||||
use pocketmine\network\mcpe\protocol\MapInfoRequestPacket;
|
||||
use pocketmine\network\mcpe\protocol\MobArmorEquipmentPacket;
|
||||
@ -851,4 +852,14 @@ class InGamePacketHandler extends PacketHandler{
|
||||
public function handleNetworkStackLatency(NetworkStackLatencyPacket $packet) : bool{
|
||||
return true; //TODO: implement this properly - this is here to silence debug spam from MCPE dev builds
|
||||
}
|
||||
|
||||
public function handleLevelSoundEvent(LevelSoundEventPacket $packet) : bool{
|
||||
/*
|
||||
* We don't handle this - all sounds are handled by the server now.
|
||||
* However, some plugins find this useful to detect events like left-click-air, which doesn't have any other
|
||||
* action bound to it.
|
||||
* In addition, we use this handler to silence debug noise, since this packet is frequently sent by the client.
|
||||
*/
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -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, GarbageServerboundPacket{
|
||||
class LevelSoundEventPacket extends DataPacket implements ClientboundPacket, ServerboundPacket{
|
||||
public const NETWORK_ID = ProtocolInfo::LEVEL_SOUND_EVENT_PACKET;
|
||||
|
||||
public const SOUND_ITEM_USE_ON = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user