Minecraft: Here’s How To Summon Moving Arrows Aimed at Mobs

Summon moving arrows aimed at mobs Minecraft

We all know that there are a ton of things you can do with commands in Minecraft, and they require a lot of game and, dare I say, programming knowledge to execute and to be able to work with them. To most, they are rocket science, but to a select few, they are a source of infinite power. You can use them to create fun mini-games, enhance your builds, and more. So, what if you, for example, wanted to summon moving arrows aimed at mobs in Minecraft? How would one do that?

  • Article Breakdown:
  • Unfortunately, summoning moving arrows aimed at mobs in Minecraft is either impossible to do or requires a true expert to pull off.
  • The only way I was able to pull it off was to enter this command into a repeating command block /execute as @e[type=zombie] at @s run summon minecraft:arrow ^ ^ ^1.0 {Motion:[0.0,0.0,0.0],Tags:["aimed_arrow"],CustomName:'[{"text":"Targeted Arrow"}]',UUIDLeast:1,UUIDMost:1,PersistenceRequired:1} which shoots the arrow in the general direction of the mob but never aims it at them and damages them.

Explaining the command

Since the command is pretty long, to perhaps try and make adjustments on your own, we need to make sure you understand the command completely. I’ll explain the command section by section:

/execute as – The execute command, as the name would suggest, executes commands but allows you to change who is executing it. The ‘as’ and what follows determines who is executing the command.

@e[type=minecraft:zombie] – the @e defines that an entity will be executing the command. Mobs are entities, so we further defined that only a zombie will execute the command. If you wanted to aim arrows at other mobs, you’d change the ‘minecraft:zombie’ part of the command.

at @s – This portion of the command tells the game to execute the command at the location of the @e(in this case, zombie).

run summon minecraft:arrow ^ ^ ^1.0 – This is where it gets complicated. The first bit tells the game to summon an arrow at the specified location, while the second bit communicates where the relative position of the entity being targeted. The 1.0 bit will make the arrow shoot one block in front of the zombie. This is also the first part of why the command can’t shoot the zombie since the zombie’s position is ever-changing.

Tags:[“aimed_arrow”] – the tag specifies which type of arrow is used to target the specific entity. This is necessary if you want a chance to pull the command off.

CustomName:'[{“text”:”Targeted Arrow”}] and CustomNameVisible:1 – These two parts of the command are completely unnecessary. The first line gives each arrow summoned a name. In our case, when the command is executed, each arrow will be named ‘targeted arrow’. The second part makes the name of the arrow visible above it.

UUIDLeast:1,UUIDMost:1 – Every entity in the game has a unique identifier that helps the game recognize them. In the case of arrows, both Universally Unique Identifiers are set to 1, which tells the game that we’re talking about arrows. This part of the command helps separate each arrow summoned so that we can interact with each arrow separately if needed.

PersistenceRequired:1 – If persistence is set to one, this ensures that the arrow doesn’t despawn naturally, but rather, the player has full control over what will happen to it.

Arrow motion

Now that we removed the command let’s see what else is required for the command to work. Spawning an arrow using the above command will only spawn it; the arrow won’t have motion, so we need to add another set of commands to update its motion continuously. The command is:

/execute as @e[type=arrow,tag=aimed_arrow] at @s run data modify entity @s Motion set from entity @e[type=zombie,sort=nearest,limit=1] Pos[0]
/execute as @e[type=arrow,tag=aimed_arrow] at @s run data modify entity @s Motion[1] set from entity @e[type=zombie,sort=nearest,limit=1] Pos[1]
/execute as @e[type=arrow,tag=aimed_arrow] at @s run data modify entity @s Motion[2] set from entity @e[type=zombie,sort=nearest,limit=1] Pos[2]

The command will continuously update the arrow’s motion to appear like it’s moving. This command should be added to a repeating redstone circuit and typed into a command block.

Repeating command block and repeating redstone circuit Minecraft

Problems you might run into trying to make the command work

The most obvious problem is that the arrow will never shoot at the mob. Still, probably the biggest one is that the command does not specify which entity (in this case zombie) you want the arrow to shoot, which means that there will be a lot of lag since it’ll try and shoot every zombie currently in your loaded chunks.

The only way to fight this lag is to destroy the command block running it. I could also stop it by killing all zombies in my world and summoning one zombie.

This means that the command might work in your custom world where you have no mob, only a specified amount of mobs in a certain area, but that’s me just being optimistic about the chances of this command working.

I also tried running this command.’execute as at @s run summon minecraft:arrow ^ ^ ^1 {Motion:[0.0,0.0,0.0],Tags:["moving_arrow"],Pickup:0b,Life:100s,Damage:2.0f,ShotFromCrossbow:1b,CustomPotionEffects:[{Id:"minecraft:instant_damage",Amplifier:0b,Duration:100}]}‘ but unfortunately, the command doesn’t work at all or works in random intervals. My guess with this command is that I didn’t manage to write it correctly, according to the 1.19.4 rules, which is where I was trying to make the command work.

What are your thoughts on this specific problem? Do you know where we went wrong and if making the command work is possible? Let us know in the comments.

Notify of
Inline Feedbacks
View all comments