Topic category: Help with Minecraft modding (Java Edition)
-Brief summary:
Minecraft version 1.20.1
Mcreator version 2023.4
I'm trying to make it so that when a player eats an item, there's a 75% chance of one of three effect groups being applied to it, with a 10-second delay. I haven't had any problems with this.
I've added four sound variations with equal drop rates and text as a notification about the effects being applied.
But here's where the problem arises:
Sounds can play separately from the effects, or they can fail to play at all when both text and effects are present.
However, I want sounds to play only when the effects and text are present.
I have two separate procedures:
1. A procedure with effects and text
2. A procedure with sounds.
Any help would be appreciated :)
-Code:
Poisoning Procedure:
https://pastebin.com/VrpSpBBt
Sound Procedure:
https://pastebin.com/mDAuMHm0
Please read https://mcreator.net/wiki/developing-multiplayer-compatible-mods, section about random chance
Thank you! It really works
Glad to hear it works!
I suggest you check our tutorials collection playlist on our YouTube channel which contains many examples and tutorials that can help you get started with MCreator: https://www.youtube.com/playlist?list=PLAeL-oIFIEngE6jRgFYeFMfuj8WQsO3Ei