Sound Physics Remastered

Sound Physics Remastered

38M Downloads

[1.18.1] Zombie Awareness Compatibility

Darkosto opened this issue ยท 9 comments

commented

Is your feature request related to a problem? Please describe.
Hello! I just downloaded Zombie Awareness and it seems like a number of game sounds (such as Zombies taking damage) are missing when using Sound Physics. Disabling sound physics allows the sounds to come back. Are you able to look into support for this mod?

MC: 1.18.1
Sound Physics: 1.1.8.1-1.0.3
Zombie Awareness: 1.18.1-1.12
Forge: 39.0.9

https://www.curseforge.com/minecraft/mc-mods/zombie-awareness

Thank you!
Darkosto

commented

I can't look into this issue, since their code for 1.18 is closed source. Unfortunately this will make it harder to find a solution...

commented

Thanks for trying. Posted on ZA but no response from mod owner :-/

commented

Ah my bad never actually pushed the new branches, fixed.

Figured as much we both mixin to similar areas, mine might be too invasive, I'm redirecting the broadcast call in playSound so i can hook in and get the coordinates of the sound playing that lack player references (forge doesnt provide this without a player), I just need to hook and call my method, not change any functionality, if there is a cleaner mixin to use I'm open to trying it out, examples encouraged :D

Its these that conflict maybe?
Yours: https://github.com/henkelmax/sound-physics-remastered/blob/1.18.1/common/src/main/java/com/sonicether/soundphysics/mixin/ServerWorldMixin.java

Mine: https://github.com/Corosauce/ZombieAwareness/blob/1.18/src/main/java/com/corosus/zombieawareness/mixin/MixinPlaySound.java

commented

Its these that conflict maybe? Yours: https://github.com/henkelmax/sound-physics-remastered/blob/1.18.1/common/src/main/java/com/sonicether/soundphysics/mixin/ServerWorldMixin.java

Mine: https://github.com/Corosauce/ZombieAwareness/blob/1.18/src/main/java/com/corosus/zombieawareness/mixin/MixinPlaySound.java

Yeah these mixins might not work together, but even if my mixin wouldn't work at that place, it wouldn't cause any big issues (At least on my side).

I don't know how mixin conflicts are handled, but it might be that my mixin gets prioritized in that case and thus your code never gets executed and that's what's causing no sounds to be played...

Instead of using redirect, you could use @Inject with LocalCapture:
image
https://fabricmc.net/wiki/tutorial:mixin_examples

It should do the same without causing incompatibilities.

I could also try setting a lower priority of the mixin on my side if that's not possible.

commented

Resolved ๐Ÿ‘

Thanks for the insight, it was just what it needed, I don't fully understand why it was breaking specific sounds before, but I reproduced the issue then fixed it with this: Corosauce/ZombieAwareness@db926bd

You can test with this ZA release once curse approves it: https://www.curseforge.com/minecraft/mc-mods/zombie-awareness/files/3603741

commented

Awesome! Thanks!

commented

Tested it and it seems to work fine

commented

Thank you @henkelmax and @Corosauce for resolving this!

commented

Ditto that! Much appreciated.