6

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
8

Create a team:

/scoreboard teams add Friendly

Join the team:

/scoreboard teams join Friendly

On a clock, make all zombies join the team:

/scoreboard teams join Friendly @e[type=Zombie]

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

  • 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.