Minecraft Mob behaviour

minecraft-commandsminecraft-java-edition

I was wondering if it's possible to control what zombies do. Is it possible to make the zombies attack certain players but not attack other players? I haven't tried anything yet because I'm guessing this will require /scoreboard and I know nothing of this command. I'm on 1.7.10 minecraft and I'm wanting to do this in vanilla minecraft.

Best Answer

This is not possible in 1.7.10 vanilla due to the severe lack of command features, namely the @e selector.

I would highly recommend upgrading to a more recent version. For example, in 1.8, the @e selector was introduced in order to target non-player entities with commands, as well as the ability to add mobs to a scoreboard team. If a mob is in the same team as a player, that mob will no longer be hostile towards that player but will remain hostile towards non-teammates.

/scoreboard teams add Passive
/scoreboard teams join Passive @p @e[type=Zombie]