How to execute a command relative to an entity

How to execute a command relative to an entity - Man Holding a Megaphone

I was wondering how to execute a command relative to an entity in Minecraft using commands for a map I was working on. I am somewhat familiar with the use of the /execute command, but wanted to use the /summon to make a grenade using item drops or arrows, then have TNT summoned to the area that the item is in.






Pictures about "How to execute a command relative to an entity"

How to execute a command relative to an entity - Man With Megaphone Pointing
How to execute a command relative to an entity - Delighted female relatives sitting together on wooden bench in park and browsing mobile phone while learning using
How to execute a command relative to an entity - Happy family members talking and sitting down to eat tasty food at big wooden table in backyard in daytime



How do you execute a entity command in Minecraft?

For the command to kill a player or other entity, see Commands/kill. /execute executes another command but allows changing the executor, changing the position and angle it is executed at, adding preconditions, and storing its result.

How do you teleport to the nearest entity in Minecraft?

Players who want to move mobs to their character's position or move their character to the mob's position can use the following commands:
  • "/tp @e[type=mobtype] @p" will teleport mobs of a certain type to the closest player (usually you).
  • Typing "/tp @p @e[type=mobtype]" will move the player to them.


  • How do you use execute detect?

    Command Block Chains
  • Place another command block next to the existing block. ...
  • Open the command block interface.
  • Set the Block Type to Chain.
  • Set the Condition to Conditional.
  • Set the Redstone to Always Active.
  • Set the Command Input to /testfor @p[tag=!placed_block]




  • How to Run Commands relative to Entity position | Minecraft




    Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.

    Images: Pressmaster, Pressmaster, Andrea Piacquadio, Askar Abayev