What is wrong with this command? I want to test if there is a pig in the world and if it does, it will summon a fireball and will explode in 5 seconds. What is the problem with this command?
I just tested your command in my singleplayer world, and the fireball hovered over the pig forever and did nothing. This should spawn the fireball underneath the pig while having an upwards force, forcing the fireball to explode.
What is wrong with this command? I want to test if there is a pig in the world and if it does, it will summon a fireball and will explode in 5 seconds. What is the problem with this command?
/execute @e[type=Pig,name=10x-TNT] ~ ~ ~ summon Fireball ~ ~3 ~ {ExplosionPower:40,direction:[0.0,0.5,0.0]}
Try this:
execute @e[type=Pig,name=10x-TNT] ~ ~ ~ summon Fireball ~ ~-1 ~ {ExplosionPower:40,direction:[0.0,0.5,0.0]}
I just tested your command in my singleplayer world, and the fireball hovered over the pig forever and did nothing. This should spawn the fireball underneath the pig while having an upwards force, forcing the fireball to explode.
For some reason, it doesn't work.
Hmm... Try removing the testfor, spawn the pig in, then manually activate the command block and see what happens.