Ok, I want my character to either be ignored by zombies or unable to die (invincible). I've tried:

  • Adding a health scoreboard but this is uneditable

  • A repeating command block that gives the player instant health

    effect give @a[scores={ifBeast=1..}] minecraft:instant_health 1 10
  • Making the player invisible (If you get close to the zombies they chase you)

None of the above work. The option that I would prefer is for the Zombies to completely ignore the player, but if I must resort to them being invincible to zombies while still getting hit (irritating) then I will accept that.

  • I might just have got this. I'm considering adding a "team" element. – Reflexive Feb 23 '17 at 18:30

Create a team:

1.13+: /team add friendly
1.12-: /scoreboard teams add friendly

Join the team:

1.13+: /team join friendly
1.12-: /scoreboard teams join friendly

On a clock, make all zombies join the team:

1.13+: /team join friendly @e[type=zombie]
1.10-: /scoreboard teams join friendly @e[type=Zombie]

Mobs in the same team as you will not attack you.

| improve this answer | |
  • Yep works perfectly thanks. (Will accept in 8 minutes) – Reflexive Feb 23 '17 at 18:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.