Topic category: Help with Minecraft modding (Java Edition)
I am making a bear trap which why stepped on, closes and the block switches to beartrap_0 to beartrap_1 to beartrap_2, then deals the damage and plays the sound. All of that works perfectly (besides the audio playing multiple times) but i run into issues under the sound block. With the while block nothing in it will work, and the version i tried without the while block( everything contained in the if do else block) but it only runs for 20 ticks then stops. I want to make it so that you have slowness/ wont be able to move until the beartrap is gone. To me it looks like everything should work, but in contract ive only been using mcreator for 1 day. Any help would be greatly appreciated!
You need to be pretty careful with Wait and While blocks; they're useful, but they can break things pretty easily- your procedure probably isn't working because the While block is either always true, (because the beartrap is always the same), or because the while block never triggers, since you have the change on a delay.
I'd recommend restructuring this to have each of these actions unique to each state of the beartrap, instead of trying to run them all through the same procedure. For example:
...In short, try separating this out so that each state calls the next step, instead of trying to do it all at once.