stormfrenzy

/execute command

Dec 13th, 2014
1,169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.18 KB | None | 0 0
  1. execute <player|entity> <x> <y> <z> <command>
  2. execute <player|entity> <x> <y> <z> detect <x2> <y2> <z2> <block> <data> <command>
  3.  
  4. ► Replace the block beneath a snowman with a packed ice block.
  5.  
  6. /execute @e[type=SnowMan] ~ ~ ~ setblock ~ ~-1 ~ minecraft:packed_ice
  7.  
  8. ► Create heart particles above all horses only if the horse is 10 or more blocks away from where the command is executed.
  9.  
  10. /execute @e[type=EntityHorse,rm=10] ~ ~ ~ particle heart ~ ~4 ~ 1 1 1 1 3 force
  11.  
  12. ► Create a creeper firework when a player is near a creeper.
  13.  
  14. /execute @e[type=Creeper] ~ ~ ~ execute @p[r=3] ~ ~ ~ summon FireworksRocketEntity ~ ~ ~ {LifeTime:25,FireworksItem:{id:401,Count:1,tag:{Fireworks:{Explosions:[{Flicker:1,Type:1,Colors:[4304440,3491355],FadeColors:4304440]},{Type:3,Colors:[10133921]}]}}}}
  15.  
  16. ► Create a lightning bolt whenever a pig is detected on soul sand
  17.  
  18. /execute @e[type=Pig] ~ ~ ~ detect ~ ~-1 ~ minecraft:netherrack 0 summon LightningBolt
  19.  
  20. Notes:
  21. You can join multiple execute commands and specify different player or entity conditions. For example, execute @e[type=!Chicken] ~ ~ ~ execute @e[type=!Bat] ~ ~ ~ command
  22.  
  23. More information:
  24. http://minecraft.gamepedia.com/Commands
Advertisement
Add Comment
Please, Sign In to add comment