So me and my friend are creating a Mario-like game in Minecraft Bedrock Edition. We are struggling with trying to come up with code. What we need is so if the player is standing on a red mushroom it breaks the mushroom and gives the player an item. The problem is that we need to have both things happen at the exact same time (without a comparator delay too) so that you can pick up multiple mushrooms in a row without missing any.
We have tried
/execute @a ~~~ detect ~~~ red_mushroom 0 fill ~~~ ~~~ air
and then hooking it up to a give command using a comparator. Obviously it works but we cant have a delay between picking up the mushrooms.
We have also tried running two execute commands in repeating, one that gives you an item and one that destroys the mushroom. The problem is it creates a 50/50 of if it works or not.
Could someone help us out with this?