3
0
Mirror von https://github.com/GeyserMC/Geyser.git synchronisiert 2024-12-25 15:50:14 +01:00

Add sound when an arrow hits a player

Dieser Commit ist enthalten in:
RednedEpic 2020-10-15 01:21:12 -05:00
Ursprung 2ca2436cdc
Commit 40de801eb0

Datei anzeigen

@ -145,6 +145,14 @@ public class JavaNotifyClientTranslator extends PacketTranslator<ServerNotifyCli
session.sendMessage(LocaleUtils.getLocaleString("block.minecraft.spawn.not_valid",
session.getClientData().getLanguageCode()));
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:
break;
}