Posts

Showing posts from March, 2023

The Mystical World of /Execute

  The Mystical world of /Execute Ok, ok. For anyone new to programming in Minecraft, /execute can be a little overwhelming. So in this series of articles, I’ll explain how they work.  /execute at or as Let’s say you wanted every pig in your Minecraft world to teleport to you, one by one. Well, first you’ll need your selector (article for that coming soon). For me, I’ll use  @e[type=pig,limit=1,sort=furthest]  this tells Minecraft to select the furthest pig from you. The reason I do this is if I use random, sometimes Minecraft might tp a pig already at your location to yourself, and vice versa for nearest. Note: as or at can only have one entity selected, so this command needs to go in a repeating command block. Now, is simply type  /execute at  @e[type=pig,limit=1,sort=furthest] run tp @s @p Now, I used at because using as is more for making the pig say something in chat. For example:  /execute at @e[type=pig,limit=1,sort=furthest] run say Oink! Oink!