Topic category: Help with Minecraft modding (Java Edition)
I have a mod that add pills of the game "The binding of Isaac"
This pills work simple, you use one, hoy see the effect and your name in chat.
Also you hear a voice that say what pill Is
My problem Is whit a special pill calles gold pill, that whit a random selector make one of the 17 effects, the procedure Is simple
(This, but 17 times)
When variable ≥ X and variable ≤ X do
Call procedure "insert pill effect"
Set cooldown to this item to 10
Everting fine, the pill effect Is Random, gives you the effect, your name and the effect apparear on the chat...
But the sound work bad, taking a random sound and not the one selected on the procedure, the problem Is the calle procedure part, when i calle the procedure, i call:
"Insert effect"
Say on chat "player" as get "pill effect"
If client side only:
Play sound "good/bad/neutral pill"
Play sound "pill effect"
So, it dont have Sense for me, why if I calle the entire procedure, i Heard a random sound?
I test using NTB variables, player variables and private variables. No one work
After 3 years I have this bug too, doesn't seem to be fixed yet as of version 2024.2. It also has the double sound bug too.
Seems to be broken only when using the "Play sound" procedure block.
FIX:
For anyone finding this forum post, a workaround is using the "Execute command" procedure block found in World Procedures > Actions and using the /playsound command. This seems to work fine, haven't had any problems yet.
This is bugged:
This works fine: