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

    Details

    • Type: Bug
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: 1.14.4
    • Fix Version/s: None
    • Labels:
      None
    • Confirmation Status:
      Unconfirmed
    • Category:
      Mob behaviour

      Description

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

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated: