Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-157990

Fleeing mobs sometimes pathfind towards damage source when knocked back

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Awaiting Response
    • None
    • 1.14.4
    • None
    • Unconfirmed
    • Mob behaviour

      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}]}
      

            Unassigned Unassigned
            kypnrp kypnrp
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: