1

When you punch a villager, it would run away from you until it reaches a distance and calm down so chasing it is actually possible.

I have my own solution for this where a baby zombie is constantly teleporting near you or above your head and iron golems and that zombie are on the same team so it wouldn't bother to attack it.

I would like to know if there are other possible ways to make villagers run away from you relying entirely on commands. If possible, no visible zombies are allowed.

  • I believe the baby zombie solution should work just fine, just give it the Silent:1b tag and an infinite particle-hiding invisibility effect. NoAI would help as well. – Sam Hill Jul 14 at 14:36
  • 1
    Sadly, invisible zombies doesn't scare villagers. – Robomike Jul 16 at 2:56
-1

The invisible zombie will attack you on survival, and if you're in creative the collision will move you. the thing you may first need it's the zombie (this time will be no invisible, but silent):

/summon minecraft:zombie ~ ~ ~ {Silent:1}

After, you will need add a team for

/team add zombie

After, you will need to modify the team and erase the teammate collision

/team modify zombie collisionRule pushOtherTeams

And then (optional), FriendlyFire

/team modify zombie FriendlyFire false

After, you will need add the zombie (and you). it's easy, you had to stay near to the zombie and put:

/team join zombie @e[type=zombie,distance=..3]

For you, only /team join zombie

Final step, you will need the zombie does not stay near of your camera (player vision) Put a repetitive command block, in it:

/execute at <your name> as @r run teleport @e[type=zombie,team=zombie] ^ ^ ^-1

| improve this answer | |
  • Won’t that make a zombie be right in the player’s face though? Even if it achieves that the side result of not being able to see seems like a huge hinderance – Penguin Oct 31 at 0:45
  • This solution is literally what the asker already has. They're asking about not having a visible zombie around. – Fabian Röling Oct 31 at 1:03

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.