Okay while trying to make a scroll like thing that summons lightning.. I realized it targeted villagers, how can I fix this command to do that?
/execute @e[r=8,type=!Player,type=!Villager,count=-1] ~ ~ ~ /summon LightningBolt ~ ~ ~
Arqade is a question and answer site for passionate videogamers on all platforms. It only takes a minute to sign up.Sign up to join this community
You cannot have more than one parameter with the same key name. The last one defined will be used instead.
To exclude two different entities based on
type, you can assign a label separately and then target those that do not have the label.
As well, the correct parameter for maximum count is
Example using a scoreboard team:
/scoreboard teams add Exclude /scoreboard teams join Exclude @a @e[type=Villager] /execute @e[r=8,team=!Exclude,c=-1] ~ ~ ~ /summon LightningBolt ~ ~ ~
Example using 1.9's "tags" feature:
/scoreboard players tag @a add Exclude /scoreboard players tag @e[type=Villager] add Exclude /execute @e[r=8,tag=!Exclude,c=-1] ~ ~ ~ /summon LightningBolt ~ ~ ~