If a villager/wandering trader is spawned riding any zombie varient, they can be targeted by the zombie, but will be immune to its attacks.
Steps to Reproduce:
Exectute the following command:
/summon minecraft:zombie ~ ~ ~ {Passengers:[{id:villager}]}
Spawn villagers around the zombie
Expected & Observed Results:
❌ - The zombie will walk around slower than usual, and while not appearing to target the villager, seemingly will. No other villagers spawned around the zombie will be targeted.
✔ - The zombie would either be able to attack the villager riding it, or if it is intentional that the zombie not be able to attack the villager, would instead attack other villagers around it.
Screenshots/Videos:
[media]
Notes:
The general behavior of mobs riding other mobs seems to be that an entity can attack the entity it is riding, but not the other way around. this would indicate that the proper fix to this would be to have the zombie ignore the villager riding it, rather than attacking it.
Linked issues
relates to 2
Attachments
Comments 11
Isn't the zombie supposed to be controlled by the villager? Or should the zombie still attack the player? As far as I know the zombie should lose control and the villager will control the zombie.
@thcrafter06 I believe you are correct for the most part, however I've done some testing and that is again not what happens in this instance. The zombie does still attack players in survival mode and the villager has a lot of difficulty path-finding to workstations (though it can path-find fine on an animal such as a chicken, and can also restock items). The zombie's AI seems to be dominant.
Also as I mentioned, with other examples of prey riding a predator such as a chicken riding an ocelot, the predator simply kills the animal that is riding it.
Can confirm in 1.20.4 and 23w41b.
This behavior is different now after the changes in 23w31a to the riding positions of entities.
The zombie no longer tries to attack the villager above, but does seem to target it (though, differently now). It still walks slowly, but will not play the attack animation, not walk in circles, and will not try to damage other villagers surronding it (indicating that it already has a target).
I would like to request ownership of this issue as the original reporter has been inactive for 3 years now.
Please provide a screenshot of the setup with the F3 debug screen enabled.