Hello all,
In my mod I have a block which plays some sound effects. The sounds/actions are triggered server-side and sent to the clients. I am currently going through a refactor which is trying to reduce the amount of packets that is sent between the server and client, however I noticed a problem.
I am able to successfully send particle messages from the server to the client and have them spawn by invoking World#spawnParticle(String, double, double, double, double, double, double) on the world object, however for some reason invoking World#playSoundEffect(double, double, double, String, float, float) does not play the sound effect, instead I've found that it requires me to actually invoke that method server-side or it won't be heard on the client at all... I'm not too sure what I'm doing wrong here, so any suggestions would be greatly appreciated!
Code
IMessage: https://github.com/theoriginalbit/MoarPeripherals/blob/master/src/main/java/com/theoriginalbit/moarperipherals/common/network/message/MessageSoundEffect.java
IMessageHandler: https://github.com/theoriginalbit/MoarPeripherals/blob/master/src/main/java/com/theoriginalbit/moarperipherals/common/network/message/handler/MessageHandlerSoundEffect.java
— BIT