Henry_Cat

Homing Missile Commands

May 10th, 2020
1,764
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.81 KB | None | 0 0
  1. Mobs:
  2. Section 1:
  3. execute as @e[tag=missile,type=minecraft:armor_stand] at @s run tp @s ^ ^ ^0.6 facing entity @e[sort=nearest,name=targeted,limit=1]
  4. execute as @e[tag=missile,type=minecraft:armor_stand] at @s if entity @e[name=targeted,distance=..1] run summon tnt
  5. execute as @e[tag=missile,type=minecraft:armor_stand] at @s run particle minecraft:explosion ~ ~ ~ 0.1 0.1 0.1 1 10 normal @a
  6. execute as @e[tag=missile,type=minecraft:armor_stand] at @s if entity @e[name=targeted,distance=..1] run kill @s
  7. execute unless entity @e[name=targeted] run kill @e[type=minecraft:armor_stand,tag=missile]
  8. Section 2:
  9. execute if entity @e[name=targeted] unless entity @e[type=minecraft:armor_stand,tag=missile] run summon minecraft:armor_stand ~ ~5 ~ {Tags:["missile"],Invisible:1}
  10.  
  11. Players:
  12. Section 1:
  13. execute as @e[tag=missileP,type=minecraft:armor_stand] at @s run tp @s ^ ^ ^0.6 facing entity @p[tag=targeted]
  14. execute as @e[tag=missileP,type=minecraft:armor_stand] at @s if entity @e[tag=targeted,distance=..1] run summon tnt
  15. execute as @e[tag=missileP,type=minecraft:armor_stand] at @s run particle minecraft:explosion ~ ~ ~ 0.1 0.1 0.1 1 10 normal @a
  16. execute as @e[tag=missileP,type=minecraft:armor_stand] at @s if entity @a[tag=targeted,distance=..1] run kill @s
  17. execute unless entity @e[tag=targeted] run kill @e[type=minecraft:armor_stand,tag=missileP]
  18. execute unless entity @e[tag=missileP] run tag @a remove targeted
  19. Section 2:
  20. tag @p[distance=5..] add targeted
  21. summon minecraft:armor_stand ~ ~5 ~ {Tags:["missileP"],Invisible:1}
  22.  
  23. If you're not coming from my video, you can check it out here: https://youtu.be/_Bk97WtG0_k
  24. Or just put everything on repeat except for Players Section 2, which should be on impulse. To run it, rename mobs as targeted to target them and activate the impulse command block to target the closest player.
Add Comment
Please, Sign In to add comment