Some sounds don't exist
gabor7d2 opened this issue · 21 comments
It's just a simple issue, if I do something with Railcraft blocks (break, step, dig, place) it does not play any sounds. It is maybe my fault I don't know, I only use the ResourceLoader mod that could interact with assets (I use a bunch of other mods too, just this is the only one that I think can do whatever things with the assets along other mods only register new assets). Some errors in the console:
[Client thread/WARN]: Unable to play unknown soundEvent: minecraft:place.railcraft
[Client thread/WARN]: Unable to play unknown soundEvent: minecraft:step.railcraft
[Client thread/WARN]: Unable to play unknown soundEvent: minecraft:dig.railcraft
Railcraft version: 9.6.1.0
If you need log files, or mod list, tell me.
EDIT: I checked the .jar file and it does only have a few sound files (8 in total) and I tried it with only this mod installed with a fresh instance + RailCraft, and it worked there so it has to do something with other mods I think.
Sorry guys. Been on bit of a hiatus, but I promise you that I haven't abandoned you yet!
Unfortunately I don't really have an answer for this issue.
My sounds disappeared after installing Chisel 2; is it present in other setups with the issue as well?
Hm, just poked into the .jar files to look for conflicts, Railcraft's /assets/railcraft/sounds.json
doesn't have entries for e.g. step.railcraft
. Not sure how related this is, but Chisel 2 does have stuff registered to step.templeblock
, step.holystone
, and step.metal
(I don't know if those correspond to minecraft:step.templeblock
and such, but if they do, the issue might be related to /assets/railcraft/sounds.json
)
step.railcraft isn't an actual sound, its a place holder tag that tells my sound processor to take over.
Then perhaps your sound processor isn't actually taking over? What would be the easiest way of telling if it's running or not?
I can't tell if it's at all related, but at some point during load, I get a pair of Not relatedMMDevApiOpenPlayback
device init failures (with error code 0x80004005). This is during the first load of the SoundSystem; the SoundSystem reloads later on without issuing those failures.
Just confirmed that Chisel 2 does cause this issue; I remove it from my local mod setup, and RC's sounds work again; I add it back, RC's sounds are gone.
EDIT: Looking at the logs side-by-side, I don't see anything logged which would cause any problems.
I poked at the Chisel code a bit but didn't see anything that I would think would interfere with it.
I'm almost able to confirm that master at Chisel2 hasn't advanced past 2.5.1.44, so it should accurately reflect the state of that side of things. I'll also continue to poke around that side of things to see if I can find anything odd.
On a hunch, since ExtraUtilities does something with PacketPlaySound
, I disabled it (Chisel2 causes Railcraft to load before EU). ExtraUtilities is not responsible.
it it possible another sound handler is 'eating' the sound event so it doesn't reach the railcraft sound handler?
That seems to be what's happening, see CJ's message in the other issue.
Continuing on that train of thought, I'm loading up OPIS 1.2.2a to see everything which handles sound events on the client side (which is why I'm using 1.2.2a instead of 1.2.5)
Okay, for net.minecraftforge.client.event.sound.PlaySoundEvent17
, there are 10 handlers:
- Blood Magic has
ClientEventHandler.onPlayerSoundEvent
(0.000µs) Extra Utilities hasEventHandlerClient.rainKiller
(0.000µs)Extra Utilities also hasEventHandlerClient.witherSoundKilling
(0.983µs)- Railcraft has
RCSoundHandler.onPlaySound
(12.225µs) - Galacticraft Core has
EventHandlerGC.onSoundPlayed
(0.000µs) Steve's Carts 2 hasMinecraftSoundMuter.soundPlay
(1.340µs)- Carpenter's Blocks has
EventHandler.onPlaySoundEvent
(1.203µs) Aroma1997Core hasClientEventListener.soundStuff
(1.145µs)Extra Utilities (again!) hasEventHandlerClient.soundMufflerPlay
(5.171µs)- OpenBlocks has
SoundEventsManager.onSoundEvent
(0.000µs)
Meanwhile, the log still has the error messages regarding Railcraft's sounds.
EDIT: Requesting Chisel's issue to be closed, since Chisel clearly isn't the root cause. Instead, I think that Chisel's changing of the mod load order might be why it caused the issue to surface.
EDIT: Crossing out entries which aren't Railcraft and aren't causing the issue
Galacticraft is the source.
EventHandlerGC.onSoundPlayed
will set event.result = event.sound
if its first if
passes and third if
fails. The first if
is a safety check which generally returns true
; the third if
fails if the player has a frequency module or is in a sound-conductive atmosphere.
As a workaround, if you rename mod .jar files to ensure that Railcraft will get loaded after Galacticraft (or anything else which consumes PSE17), you can make sure that Railcraft's handler still gets considered. For instance, my mods/
dir now has zzz_Chisel2-2.5.1.44.jar
(which is what was causing Railcraft to load before Galacticraft).
From the eyes of someone not experienced in Java (but is experienced in several other programming languages), onPlaySound
here looks pretty bulletproof. In theory, the only way that this bug (going solely by the OP) can surface is if another mod (or Forge itself) doesn't play nicely. It might make sense to swap the bug-minor
label with not railcraft
.
For future reference (for people coming across this), the way I discovered Galacticraft was the source was first dumping the clientside handlers for net.minecraftforge.client.event.sound.PlaySoundEvent17
using OPIS 1.2.2a (newer versions than that just report errors when trying to dump client handlers), then seeing what happens when I remove the mods which provide the handlers returned. The sounds returned when I removed Galacticraft, which is frequently a good enough sign itself that Galacticraft is the cause; I went an optional step further and located the exact problem in Galacticraft's code.
I just waiting for reply for the Author, but it almost feels like this Issue Tracker is abandoned... 😢
It's not abandoned, CJ just has other things to do than stare at the issue tracker waiting for stuff to some in