mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-08-14 23:57:35 +00:00
Add sound when an arrow hits a player
This commit is contained in:
parent
2ca2436cdc
commit
40de801eb0
1 changed files with 8 additions and 0 deletions
|
@ -145,6 +145,14 @@ public class JavaNotifyClientTranslator extends PacketTranslator<ServerNotifyCli
|
||||||
session.sendMessage(LocaleUtils.getLocaleString("block.minecraft.spawn.not_valid",
|
session.sendMessage(LocaleUtils.getLocaleString("block.minecraft.spawn.not_valid",
|
||||||
session.getClientData().getLanguageCode()));
|
session.getClientData().getLanguageCode()));
|
||||||
break;
|
break;
|
||||||
|
case ARROW_HIT_PLAYER:
|
||||||
|
PlaySoundPacket arrowSoundPacket = new PlaySoundPacket();
|
||||||
|
arrowSoundPacket.setSound("random.orb");
|
||||||
|
arrowSoundPacket.setPitch(0.5f);
|
||||||
|
arrowSoundPacket.setVolume(0.5f);
|
||||||
|
arrowSoundPacket.setPosition(entity.getPosition());
|
||||||
|
session.sendUpstreamPacket(arrowSoundPacket);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue