Mojira Archive
MC-157990

Fleeing mobs sometimes pathfind towards damage source when knocked back

If mobs are fleeing from an entity and it damages them, they may start running towards whatever they want to escape from. This is particularly noticeable when trying to kill cats and also when using the knockback enchantment.

Two ways to reproduce:
(I slowed mobs down for the sake of convenience. It's still work with mobs at their normal speed and without knockback II, it's just harder to reproduce and notice):

1.) Summon this cat and try to kill it with a knockback sword:

/summon minecraft:cat ~ ~ ~ {Health:50f,CatType:0,Attributes:[{Name:generic.maxHealth,Base:50},{Name:generic.movementSpeed,Base:0.18}]}

2.) Summon this villager and this zombie near each other:

/summon zombie ~ ~ ~ {IsBaby:1b,HandItems:[{id:"minecraft:stone_sword",Count:1b,tag:{Enchantments:[{id:"minecraft:knockback",lvl:2s}]}},{}]}

/summon villager ~ ~ ~ {Attributes:[{Name:generic.movementSpeed,Base:0.4}]}

Awaiting Response

kypnrp

2019-07-29, 06:13 PM

2020-11-04, 02:45 PM

2020-11-04, 02:45 PM

1

1

Unconfirmed

Mob behaviour

1.14.4

-