Hey there everyone. I'm currently attempting to fetch the input stream for the sound file of a record. The problem is that every time I attempt to it throws an exception such as
[02:24:49] [Server thread/INFO] [STDERR]: [de.mystic.vanillaexpansion.tileentity.TileEntityStereo:playCurrent:79]: java.io.FileNotFoundException: minecraft:record.mellohi
[02:24:49] [Server thread/INFO] [STDERR]: [de.mystic.vanillaexpansion.tileentity.TileEntityStereo:playCurrent:79]: at net.minecraft.client.res
The name of a SoundEvent isn't the name of the sound file(s) it plays, you need to get the file the same way that the sound system does.
First use SoundHandler#getAccessor to get the SoundEventAccessor for the SoundEvent's name (SoundEvent#getSoundName). This is a wrapper around zero or more ISoundEventAccessor objects, each of which could be either another SoundEventAccessor (a sound event) or a Sound (a sound file).
Then use SoundEventAccessor#cloneEntry to select a ran