mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-12 16:59:44 +00:00
InGamePacketHandler: Ignore LevelSoundEventPacket completely
This commit is contained in:
parent
531c6344fe
commit
69cad3e694
@ -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
|
||||
}
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user