The Execute Command [Minecraft 1.20, 1.21 Java and Bedrock] Tutorial
ฝัง
- เผยแพร่เมื่อ 30 มิ.ย. 2024
- The execute command for Minecraft Bedrock is getting parity with Java! The Minecraft execute command is essential for making datapacks and command block creations. This tutorial covers the subcommands such as execute as, execute at, execute if, execute unless, execute if predicate, and MUCH more! This tutorial is for both beginners and advanced command users.
► JOIN THIS CHANNEL FOR PERKS
/ @avidmc
►SUPPORT ME ON PATREON
/ avidmc
►JOIN MY COMMUNITY DISCORD
/ discord
►I'M ON TWITCH TOO
/ avidmc
► PREDICATE GENERATOR
misode.github.io/predicate/
► EXECUTE STORE COMMAND
• /execute store // Mine...
►SUPPORT ME ON GLIMPSE
www.glimpse.me/Avid
►SUPPORT ME ON PATREON
/ avidmc
►JOIN MY COMMUNITY DISCORD
/ discord
►FOLLOW ME
Reddit: / mcemau5
Twitter: / avid_yt
Instagram: / avidmc_yt
0:00 The Most Important Command
0:21 The Four Sub Commands
1:01 Conditional Sub Commands
1:13 Execute If Block
1:40 Execute Unless
2:06 Execute if Blocks
2:58 Execute if Entity
3:21 Execute if Data
4:26 Execute if Score
5:16 Execute if Predicate
6:03 Run Sub Command
6:13 Chaining Execute Commands
7:02 Modify Sub Commands
7:15 Execute Positioned
7:58 Execute At
8:49 Execute Aligned
9:05 Execute Rotated
9:25 Execute Facing
9:32 Execute Anchored
9:38 Execute In
9:49 Execute As
10:45 Execute Store Sub Commands
11:03 Execute Store Result Bossbar
#minecraft #commandblock #tutorial
Here's the official statement from Microsoft on the changes coming to Bedrock:
Note that the /execute command does not have full parity with Java Edition's /execute command, yet. The new Bedrock Edition experimental /execute command does not support storing the results of commands or working with conditions based on the rotation of entities, for example. Stay tuned for more to come with the /execute command.
docs.microsoft.com/en-us/minecraft/creator/documents/commandsnewexecute
It's okay and call me CK calling me by my real name makes me uncomfortable and if your wondering CK is short for codefreek becouse I love to code so most of youe content is relatable
Can do CK! Coding is awesome. I'm glad my content is relatable!
there also isnt execute if data which is sad bc inventory holding was how i did my commands
As a bedrock command when I first saw this in the command feed it scared me because I had no idea what was going on.
No need to fear friend! That’s what this video is for! Keep in mind there isn’t full parity yet, but they aren’t far off. Mainly, execute store is missing from bedrock.
I can't believe I never thought to look up how to work command blocks till now. I got so many ideas for my massive build project from all your tutorial vids, especially the structure block and playsound vids.
I’m so glad you like them 😁 if you’re looking for inspiration check out my Adventures series too!
Is there a playsound video? I can't find it anywhere and I'm interested in learning about it!
Avid is so underrated. He's got high-quality audio, good delivery when it comes to videos, high energy, and so on. We need to get him more viewers.
Thank you 😁
Thank you so much for making this, I was stressing hard about how I was gonna make a proper progression thru my dungeon; one where the player couldn’t just skip the boss and speed thru the whole thing. This command is a life saver! Hope u get the recognition you deserve
I just stumbled across this channel and this vid made me smile (I had no idea they changed how /execute worked so I was hopelessly stuck for a solid hour), keep making ur vids ;)
Thank you so much for the kind words! I'm glad I could help you!
You’re a literal life saver! Hope you’ll get more recognition
Thank you so much! It’s gonna happen eventually 🤞
this is the most video i have been searching for thank you so much
Great video. You do a really good job of keeping your energy up and that definitely makes the video more engaging. Keep up the good work!
Thank you! Im glad you thought so. This one was a beast to edit, but I’m proud of it 🙂
This is incredibly useful! Thanks Avid!
You're so welcome!
🤯 lol this is the most detail video I ever seen in Minecraft. Looking forward to looking at more videos.
Thank you so much! I have a lot of videos, but this was one of my favorites.
Haha, I am not sure I learned absolutely anything from this! Got a bunch of ideas, but that left me with more questions! And very entertaining!!
This is so helpful. I have no idea in the execute command because it's so sophisticated, but at least I can understend the basics. And, avid, can you make another execute tutorial, when you explain all the different subcommands and how to chain them?
Thank you for such an awesome explanation! You put a lot of work into your video and it shows. I hope that your channel does really well!
This is a really useful and entertaining video, thank you!
You're welcome!
Oh my god. This video is great! When I was watching the video I thought you had like millions of subscribers. You really deserve more recognition. Thank you for this video!
Thank you so much for the kind comment! In just love making content 😁 hopefully the TH-cam algorithm will turn its head towards me one day.
I found the video a little quick to follow but you did have a lot to unpack. Great information thought. Will have to do some more research on each come on command.
Totally understandable! Yes, my intent was to cover everything, which may have bit me a little bit XD Hopefully it was at least entertaining!
Of course.
I have a bedwars map on which I play with friends on Bedrock, but since execute commands update the map is broken completely. Thanks for an awesome guide! Gonna reinvent everything from scratch, but there'll be less workarounds overall which is always good.
Wow first of all great explanations of everything sometimes I would have to rewind and watch it again but I eventually got it. And secondly great job just like content wise this was so well made and you clearly spent a lot of time making this video and writing and funny script and its AMAZING just wow. Fantastic
I'm so glad you liked the video! It's tough to balance entertainment and tutorial content. I'm glad I managed that for you. Best of luck!
Thanks a lot! Because of this, me and my friend can now make a pretty epic adventure map :)
Poggers tutorial, first time using one in months
Eyy thanks buddy!
Great video!
Thank you! This one took far too long to edit. But I think it was worth it!
best execute tutorial i ever seen now i understand execute command completly
Thank you so much! This one took a while to make. I'm so glad you liked it. Now you can do ANYTHING!
Great video, great quality, great energy, there were commands i have been searching for A while now, found them all here
Keep up the great work u deserve more Recognition
U got a sub👍
Edit:saw ur videos they look amazing!im gonna watch them after this one :]
Wow thank you so much for the kind words! As a smaller creator, it’s really hard to stand out in the sea of Minecraft content. Seeing that you found me and enjoyed this video means a ton. Thank you!
This guy doing gods work out here🙏😭
5:12 using another thing than "matches" compares 2 scores, to test a greater than/less than/in range for a constant value, you use '..'. For example ..2 is less than 2, 3.. is greater than 2 and -2..5 is between -2 and 5
Brilliant. I could see so many uses for that! Thanks for the insight!
Thank you I spent 20 minutes on looking for this
This is complex but needed 🎉
ty i was confused to why the execute command wasnt working when i used it
omg knew i new how to make a execute command
why youre underrated dude you should have k's of subs with such a video quality
Thank you so much! Maybe someday!
10/10 Good tutorial, would tutorial again
10/10 comment, would make another tutorial video just to get this comment again.
Honestly thought this was gonna be just a regular ass tutorial but I really like how u used examples
I’m so glad you liked it! When I did some early research on other tutorials I noticed a lack of real examples, and so this tutorial was born. I’ll have to make an update soon with the new sub commands.
This video really helped a lot but what if i wanted a text to appear on a player's screen if they entered a certain building & a different text when exiting that building?
Hmm! That’s a little tricky but not impossible. You could tag a player when they enter the building and remove the tag when they leave. Then you show a message based on whether the player has the tag or not.
Best tutorial ever tbh
thank you!
You're welcome!
@@AvidMc you should make a playlist that showcases all commands i think it would be great for begginners
Please do more tutorials. I can't figure the stuff out on my own.
Okay!
Great! Now, the maps I have been working on for over 2 months are now completely broken because they changed /execute. Thanks microsoft and mojang.
Aww that's a bummer. If you need help with your map, feel free to join my Discord!
how did you refer to the specific special item when checking if a player is holding it? @AvicMc
I have a question i’m trying to make a game I want to know if you can detect when a player collides with a specific animal so the player can walk in an animal from the side and the player will die is there anyway that can work in bedrock? If you want better definition of what I’m talking about. Think of a Mario enemy that when you touch it, it kills you.
Come join my discord! We can help you out.
How would target selectors work on Multiplayer? Especially about @p, when placed in a data pack.
Ggz first well define!
Thank you! Hopefully you can use it!
I am trying to make a seamless teleportation command for a Bedrock map I’m working on, but when I used the command “/execute if entity @p[distance=..3]” on my console, the command did not work correctly. Any suggestions?
Hope Minecraft add execute store because it’s amazing for a map maker
so what do you type if you want it to see if there is fire next to it and if there is no fire then it sets a redstone block somewhere?
Cool
bro I can not find out how to make a simple thing where if I press lever or a button, it powers command block that fills in a redstone block
im playing in java 1.20.1. how do i use an execute command to check for a scoreboard score of 1 to 20 then execute a tp command on all items within 20 blocks of the player to that player?
Do u have a link for ur rouge like dungeon? I’ve been wanting to make one and could use some inspiration
I do! Here you go!
th-cam.com/video/ZZ85zz4KdU0/w-d-xo.html
dude pls tell me how did you made the particles kill you when touching them
if you can write me the command in the reply I would be more then happy
That’s tricky to put in a single comment. Come join my discord and we can help you out!
Yo can u make a tutorial on how to understand all the new commands (not just execute) and what they do
You should check out CloudWolf! I have a few tutorials on this channel but I mostly make adventure maps.
So quick question. When you present the staff of midnight im trying to wonder how do I do the spinning particle. Because I can just do execute @e no more. can you help me
Spinning particles are tricky! You have to summon an armorstand and rotate it in a circle. Then you need to summon particles at a certain distance away from where the armorstand is facing.
Bro I stared my world with the expreimantal and when I joined no command was working I was like what? Then I went to fix it and saw the execute command has different. I was thinking there goes everything...
Ahh that’s so frustrating.
As Bedrock command block knowing lvl 70% maybe , When I know how the commands changed after leaving MCPE for more than 1 year and 8 months, I feel my self now as a supreme Noob in Command Block, and all my maps "That I already lost them in my lost phone had been totally ruined" even my stored commands on my laptop will be now useless, Even after I watch ur video now am not sure If I can handle this due MCPE commands was super simple when combined with Java and Console editions in the how much there is symbols ,parenthesis,rectangular arc,double quote...etc
Am really mad for these changes , even tho am playing on my laptop bedrock edition
Yeah I totally get that. It’s a lot to learn all of these commands. It’s another thing to have to learn them all over again.
@@AvidMc Ok, can u make a video or just tell me how I can make a surrounding wall on BE [As huge circle wall], cuz I went through the YT and still not found 1 single video about that, even the one I got not working, so please ! Am asking much, sorry
Nice
Right back at you.
This video was help full however how do you do the command where it tps an entity to you thank you
/teleport @e[type=creeper] @s
How would I give a player a particular item after killing a specific mob. I would like this item to automatically be sent to the player’s inventory.
That's super tricky! I'd recommend using a custom loot table on the mob, so the mob drops that item when it dies. That is much, much simpler.
so this is kinda old video but i hope i get answerd anyways. if i make a /execute if data entity @p and then want a custome nbt tag on the item i wanna hold. for example if a dirt block named bob is in my offhand. how would it work? bc now whenever someone take a normal dirt block in there offhand everyone get the effect.
Come join my discord. We can help you out!
@@AvidMc ok ty good idea
I'm struggling with the execute if score command. I have an armor stand named Steve who is running the score. I keep running into issues with it though.
What issues are you running into? I bet we can help you out on my discord. The link is in the description of this video!
Could you perhaps.. idk..
Make a video on the bedrock execute command now?
Good suggestion! Thanks!
how do get the "at run" command to target a specific entity?
Come ask in my discord! We have a whole bunch of helpers dedicated to answering questions.
Uhm what about the armor slots how do i use /execute if data on them?
Come join my discord! We can help you out. Also I’d recommend a website called McStacker
I believe that bedrock needs something similar to command block autofill. That way we don't have to take so long to fine-tune where blocks, players, mobs, and so on get placed. Parity for command blocks needs to be real.
I agree completely. Command blocks are super overlooked in both versions.
For some reason the holding item command won't work
I need to execute items, do I do: /Execute as @e[type=item,name=???] run ???
Join my discord! We can help you out!
When I first saw the /execute command I thought it killed every mob In a certain radius would of been useful
This IS possible with the execute command, but you could as easily do
/kill @e[type=!minecraft:player,distance=..10]
3:52 execute at @a[hasitem={item=lightning_rod,location=slot.weapon.mainhand}] run time set night is a thing
THANKS
hasitem would be really nice in Java
How do i make it so that i hold a certain item like with enchants for the execute if data entity @p to run redstone only if i had that item in my inventory? like when i have a writable_book thats enchanted it doesnt work if i put in "execute if data entity @p {Inventory:{id:"minecraft:writable_book{Enchantments:[{id:mending,lvl:1}]}"}}"
Come join my discord! We can help you out.
@@AvidMc Thanks
The best part is 0:00 to 12:04
Umm so how to make a money system in 1.19 using execute? It so difficult now
That sounds tricky! You should join my discord and post a message in the help channel. We have a ton of smart people who could help you!
What do you have to write now instead of these ~~~,^^^ symbols on the old execute command?
the old execute command required absolute positions, so X Y Z. It was much harder to work with because of this!
@@AvidMc so instead of ~~~ and ^^^ do I write at @s?
@@gamerroyale777 what version are you on?
@@AvidMc 1.19.20 bedrock on xbox
@@gamerroyale777 Nice! I just updated my bedrock commands last night and I can confirm they work great. Check them out in the description of the video!
My map is going to be 200% better thanks!
Welcome!
PLEASE give me the commands to make it night when a ender pearl teleports a player in bedrock.
Or...
Make it night when a thrown ender pearl hits the ground
Idk if anyone is having problem with this change, but I sure am. I have a hide and seek map on bedrock that me n my friends play on. It utilizes the execute command for unique abilities, so now I have to through all my command blocks and change them to work. I was working on it today, and have noticed that the command blocks aren’t recognizing targeted entities and what not, thus the command(ability) won’t function at all. Pretty sure it’s a bug, but if anyone knows a fix pls help lol.
That’s such a bummer! If you need help, feel free to join my discord. We’re a bunch of adventure map makers who play Bedrock and Java.
I need a line of command that if a entity looks at me, a command runs
Come ask in my discord! We have a whole group of dedicated helpers.
How do you execute players with the run command
Hmm you might need to elaborate. You can do something like /execute as and then run a command as the players you're selecting. You may want to join my Discord to get more help!
I'm not very intelligent with commands at all even before this update and I can't wrap my head around this so does anyone know how I would make this old execute command into the new (execute @a ~~~ fill ~20~5~20 ~-20~-5~-20 air 0 replace leaves) I'm just trying to clear a forest quickly ;-;
/execute at @a run fill
Good to know they messed up the command I had been using with no issues for years. This is frustrating. Thanks for the tutorial though!
Yeah, it’s tough when they release breaking changes like this. Though the new version is much easier to use once you get used to it!
@@AvidMc I fought with it for ages and I can't get my Snowballs Of Doom to work. It is just super frustrating.
@@Real_Moon-Moon snowballs of doom sound amazing btw
@@AvidMc The machine used /execute to detect when a snowball is thrown and creates flat terrain, complete with stone, dirt and grass. It was super useful.
What would the new command be for execute @a ~~~ scoreboard players operation @s objective name = @s objective name
Come join my discord! We can help you out.
So is it possible to change a hostile mob into a friendly one with the execute command?
That's a great question. Technically yes, but it depends on what you'd want the friendly mob to do! You could disable it's AI, for example, so that it won't attack you.
@@AvidMc really ok wow I'll have to put some thoughts into it I know for a fact I would like to have him recruitable to fight by your side
@@darthtempest4722 controlling mob AI is really challenging. I’m sure you’ll figure it out though. If you ever need help, my discord is filled with really great datapack makers.
At if entity. I wanted to make it work if a spicific player is online but now i can figure out how to make the distance aswell
What i putted in is /execute if entity @e[name=steven3593] but if i try steven3593,distance..3] it doesn't work
Im on bedrock
Come join my discord. We can help you out.
What about this can you help me? My old command is
/execute @p ^ ^ ^4 tesfor @e[name=pig,r=3] this command its work when you look the entity or your target but i try to update
this command
its work but it's not the same like before that you look the entity it work
I hope you notice me i have video short if you have a time please watch 😢
Come join my discord. We can help you out!
Wait, my years of command block test worlds and custom maps won't all shut down? Right?
Chances are you're okay! My guess is Bedrock will keep backwards compatibility.
@@AvidMc oh, thank god
can anybody help me? In the past I used the command: /execute @e [type=pig] ~~~ detect ~~-1~ grass 1 clone ~~~ ~~~ ~~~ masked with this I cloned the personalized trees I made and thus I built a forest by cloning the tree using the specific mob, in this case when I placed the pig in the grass a tree appeared in its place. But now this command no longer exists because Mojang changed /execute. I wanted a new execute command that serves the same purpose. Anybody know?
Got confused but it’s easy
How can i get the same effect from the old format "execute @a[x=-1,y=231,z=10,r=1] ~~~ effect @s levitation 1 0 true"
Can someone help me to convert it to new format (btw new format suck👎)
Btw i wanted to use testfor to get the same effect, but testfor command has deleted bruh
This is my attempt! I don't play bedrock, so it might not be right.
/execute as @a[x=-1,y=231,z=10,r=1 run effect @s levitation 1 0 true
If you have more questions feel free to join my discord! We have a bunch of bedrock commanders there.
@AvidMc last night or maybe the night before that I saw avid adventures 10 was out but know it's gone and I'm very confused so could you clear this up
@AvidMc ?
Hey there! It's coming out next Friday! Get ready! I released it early for Patrons.
@@AvidMc thank you for notifying me I thought I Was crazy
@@AvidMc and also how do you use execute if to detect if an entity has a tag
@@azaanhassansaeedh6397 So sorry for the confusion!
Avid... WHAT ABOUT THE NEW EXECUTE ON ?!
That’s a newer command that came out after this video!
Can you make a freeze ball with the execute update
Probably yes!
@@AvidMc its ok you can have your time
All these commands work on bedrock?
Check out my pinned comment on Microsoft’s official statement. Many of the commands are ported over but not all of them.
Its kindy annoying how they update the cheat frequently that is imprinted in my brain but now i have to study at again cause its "UPDATED", like you can just make a new cheat code rather than changing the mechanic of an old cheat
I understand nothing lol 😂
It was so simple before!
Execute store it amazingly powerful I promise.
I need to be enlightened. Maybe I need to come up with a whole video on that.
@@AvidMc "execute store result storage" chef's kiss.
@@DrTrog I need to use this in a project. I like the idea of storing data in storage. I just need it to click for me!
@@AvidMc I can help explain/showcase it a bit for you if you want.
@@DrTrog yeah! That would be awesome.
Help me to fix execute @a is not working on bedrock
Heya! Double check you have experimental mode enabled (see the link in the description). If you do, make sure you’re using “exercise as @a” or “execute at @a”. If you’re still having trouble, you can join my discord! We’ll get you sorted.
Thank you
execute if entity @p[distance=..3] why there need to be 2 dots?????!!?!?!?!
The dots before the number mean 3 and smaller.
My execute if data isn't working
Nvm
Now my old commands don't work and I can't figure it out I hate this
Sorry to hear that :(
@@AvidMc I figured it out and your video helped a lot thanks
No wonder why my execute commands doesnt work
Yeah it was a big breaking change
they changed the execute command from bedrock back to how it was
Good to know! Maybe I should say The execute command is changing BACK.
I am able to code in css java scratch python html but yet my head hurts this video
Someone teach me how to make a particle aura plssssss 😢
Come join my discord. We have a whole help form for things like this!