Setting Sounds to Play on Client or Server

Started by rmsandegs on

Topic category: Feature requests and ideas for MCreator

Joined May 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Setting Sounds to Play on Client or Server

The play sound procedure has an interesting quirk where it plays on both the client and server simultaneously. I cannot think of a use case for this behavior, and it usually just ends up meaning I have to specify that the sounds should play on only the server.

I think a good solution to accommodate this in a non-obtrusive way would be to add a checkbox on the procedure block that makes the sound play on the client when checked. This way, the default behavior is what is most often needed-- the sound plays on the server-side and everyone hears it. But there is still the option to play the sound on the client side if needed.

Joined May 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I know I can, and I do, but…
Wed, 06/30/2021 - 08:30

I know I can, and I do, but I'd be lying if I said I like doing that every time. I'm obviously not very familiar with programming the MCreator application itself, but I'd appreciate this quality-of-life feature nonetheless.

I could revise my request to have two checkboxes-- one for client and one for server-- and the sound would play accordingly. The last time I peeked into the code, I saw that the procedure has two different calls to play the sound on the client and the server. So basically I would like the checkboxes to tell the procedure to omit one of those calls (or not) depending on which one is checked.