
Hey everybody, it’s Under My Cap, and welcome back to another video! Today, I’m going to show you how to use command blocks to create block effects on any type of block you want. This is very simple. Although you can see a whole bunch of command blocks over there, linking them is actually really straightforward. Don’t worry—trust me, you’ll get it by the end of this episode! As soon as you watch this, you’ll be able to do this, guaranteed! Basically, all this involves is the execute command, where you are executing a certain command at a block to give the player a beneficial effect, or alternatively, a negative one. I’ve set up three examples here to illustrate how to do it, and of course, you can change the effects and particles afterward. I’m just using them for now to help explain and showcase how cool this is. Let’s start with the first example. Here, I have a strip of blue concrete. As soon as I walk on it, you’ll notice that I gain some speed, and I have soul fire flame particles beneath my feet. This is really cool because the particles don’t follow you when you jump or when you’re on the grass. They stop right at the edge of the block. If I switch to third-person view, you’ll see that when I run over it, the particles do follow me, which is very cool. However, if I step on the grass, they stop. Now, this command is very simple, and I’ll show you how to set it up. You’ll need three command blocks, and one comparator. The comparator should face toward your next command block located behind the first one. In the first command block, type in “/execute”, then “at” and your username (or you can choose “everyone” or “all entities” if you want it to apply to others). I’m going to use my username, so it will be “execute at Under My Cap if block”. Then, you’ll need to add three tilde signs (~~~) with the middle one having a negative number because you’re testing the block beneath you. After that, type in “blue concrete” or any block you prefer. Then you type “run”, followed by “particle”, and let’s set it to “soul” for now. After that, type three more tilde signs (~~~) again, followed by “0.1 0.1 0.1,” which will spread the particles a little outwards. Next, you’ll set the speed to “0” and the count to “10.” You don’t need to worry about this last part too much—if you want other players to see it from far away, you would type in “force,” but if you don’t mind, you can just leave it blank. Once you’ve done that, switch this command block to “Repeat” and turn it on. In the next command block, type “/effect” followed by “give,” your name, “Under My Cap,” and then give the effect of speed. This is the slightly complicated part: type in “1” for duration and “4” for amplifier, and also hide particles because we don’t want it to look like you’ve just received an effect. Press “Done.” Now, when I step on this block, I have to make sure both command blocks are set to “Repeat” and turned on. You’ll notice that as soon as I step on this block, I gain speed, and the soul particles appear beneath me. Now, moving on to the next example, this one is designed to harm the player with the wither effect. I’ll switch to survival mode just to demonstrate. You’ll see that I have full health, and as soon as I run over this block, my health starts to decrease. You should also hear a burning fire sound when I walk over it. This setup is similar to the last command, but you’ll need to add some extra code. You’ll need to place three command blocks in an L-shape, then insert two redstone comparators. In the first command block, type “/execute at Under My Cap if block beneath me is red concrete,” then add “run particle lava” followed by the tilde signs (~~~) and “0 0.1 0.1 0.1” for spread. After that, add “0 10 normal,” and make sure this command block is also set to “Repeat.” In the next command block, this one is for playing sounds. Type in “minecraft:sound” and choose “player.hurt_on_fire.” Then make sure this block is also set to “Repeat” to ensure you can hear it constantly. For the final command block, type “/effect give Under My Cap wither 1 10” to apply the wither effect. Now, if I activate this, you should see that I receive the same effects as before. It looks cool as well! For the last example, it’s very similar to this one, but I’ve changed the sound and the effect. When I hop onto this block, it only plays the sound once but heals me, and as you can see, there’s a heart effect. This is because hearts are associated with healing. Every time you jump off the block and land back on it, the sound plays. I’ll show you this in survival mode. I got quite damaged, and then if I step on this block, I heal up. You can choose whichever color block you want for this. This command setup is essentially the same as the others, except I’ve changed the particle effect. Instead of making the sound repeat, I made it play just once with an impulse command block. The effect is set to give regeneration. So, that’s basically it for the simple examples! If you want me to dive deeper into any of these in another video, please comment down below. Thank you so much for watching! If you enjoyed this video, please leave a like and subscribe to the channel with notifications turned on; that would be greatly appreciated. I love making YouTube videos and responding to your comments and video ideas, so let me know what you think! You can also follow me on my social media, which is linked in the description below. My new website, also linked, contains a variety of command tutorials, including particles and play sound commands. Thank you again for watching, and I hope to see you in the next video! See ya!
This post has used AI to generate and enhance content