Implemented a way to play ISound(s) to players without using a sound ID.

This commit is contained in:
Luis C.M committed 2022-12-21 19:07:19 -06:00
1 parent a895c8bd24
commit 5d520837b1
8 files changed
+34 -1

No files matched your search

@@ -314,6 +314,11 @@ public class PacketHandlerClient extends PacketHandlerServer{
ScriptSoundController.Instance.playSound(id,sound);
}
else if(type == EnumPacketClient.PLAY_SOUND_TO_NO_ID) {
NBTTagCompound compound = Server.readNBT(buffer);
ScriptClientSound sound = ScriptClientSound.fromScriptSound(compound, player.worldObj);
ScriptSoundController.Instance.playSound(sound);
}
else if(type == EnumPacketClient.STOP_SOUND_FOR) {
int id = buffer.readInt();
ScriptSoundController.Instance.stopSound(id);