mojira.dev
MC-143804

Wanding traders being invisible doesn't prevent them from being found by zombies

The bug

Wandering traders will be targeted by zombies in a 35 block radius. This is also the case if the wandering trader is invisible (by drinking an invisibility potion), which renders the invisibility effect pointless. (Or, rather, its only effect is hiding the wandering trader from the player)

To reproduce

This is how I reproduced this issue, to make sure that no external factors would influence my test:

  1. Create a flatland world

  2. Disable the gamerule doMobSpawning

  3. Spawn a wandering trader

  4. Make sure that wandering trader doesn't move (for example with NoAI)

  5. Spawn a zombie (or husk) 35 blocks away from the trader

  6. That zombie will start to target the trader

  7. Spawn a zombie 36 blocks away from the trader

  8. That zombie won't start to target the trader, unless he walks into that 35 block radius

  9. Set time to midnight

  10. Make sure that the wandering trader drinks its invisibility potion (NoAI needs to be set to false for this!)

  11. Spawn the zombies like before when the trader was visible

  12. Same result as above!

Video

https://youtu.be/hDESxghxm6U

Linked issues

Comments 4

You could maybe add that it applies to all mobs that are invisible and targetted by zombies.

Duplicate of MC-79320.

@unknown merged this ticket into MC-79320 after I created it.

Resolved as a duplicate in favour of the older one.

Even if it didn't mention wandering traders yet, that would still make this a duplicate, as the cause is exactly the same piece of code.

violine1101

(Unassigned)

Unconfirmed

AI, invisibility, pathfinding, wandering_trader

Minecraft 19w06a

Retrieved