diff --git a/java/com/dynious/soundscool/tileentity/TileSoundPlayer.java b/java/com/dynious/soundscool/tileentity/TileSoundPlayer.java index 7ca79ce..7b5b4de 100644 --- a/java/com/dynious/soundscool/tileentity/TileSoundPlayer.java +++ b/java/com/dynious/soundscool/tileentity/TileSoundPlayer.java @@ -56,7 +56,7 @@ public void selectSound(String soundName) public Sound getSelectedSound() { - if (selectedSound != null && SoundHandler.getSound(selectedSound.getSoundName()) == null) + if (selectedSound != null && NetworkHandler.getServerSound(selectedSound.getSoundName()) == null) { selectedSound = null; } @@ -102,7 +102,16 @@ public void func_145841_b(NBTTagCompound compound) @Override public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt) { - selectedSound = SoundHandler.getSound(pkt.func_148857_g().getString("selected")); + String soundName = pkt.func_148857_g().getString("selected"); + Sound sound = SoundHandler.getSound(soundName); + if (sound != null) + { + this.selectedSound = sound; + } + else + { + this.selectedSound = NetworkHandler.getServerSound(soundName); + } } //getDescriptionPacket()