making BlockPunchSound server-controlled

This commit is contained in:
Dylan K. Taylor
2020-05-01 12:23:00 +01:00
parent 1969766b70
commit 2964a4be35
3 changed files with 52 additions and 0 deletions

View File

@@ -756,6 +756,7 @@ class InGamePacketHandler extends PacketHandler{
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_HIT: //block punch, maybe entity attack too?
case LevelSoundEventPacket::SOUND_LAND:
case LevelSoundEventPacket::SOUND_FALL:
case LevelSoundEventPacket::SOUND_FALL_SMALL: