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

followRange Attribute doesn't work properly on some mobs


    • Icon: Bug Bug
    • Resolution: Fixed
    • Minecraft 1.11.1
    • Minecraft 16w40a, Minecraft 16w41a
    • None
    • Unconfirmed

      followRange doesn't work properly on Snowmen. It works as long as the snowman is able to walk. It works on a snowman summoned like this:

      /summon minecraft:snowman ~ ~3 ~ {Attributes:[{Name:generic.followRange,Base:100}]}

      But it doesn't work as soon as the snowman isn't able to move anymore. E.g. a snowman summoned with this command:

      /summon minecraft:snowman ~ ~3 ~ {Attributes:[{Name:generic.followRange,Base:100}],NoGravity:1}

      or this command:

      /summon minecraft:armor_stand ~ ~3 ~ {Passengers:[{id:snowman,Attributes:[{Name:generic.followRange,Base:100}],Invulnerable:1}]}

      A snowman summoned with that command doesn't try to move and doesn't shoot snowballs at e.g. a zombie that is further away from it than a few blocks.

      I'm pretty sure the snowman should still shoot zombies within the 100 block range even if it can't hit them. Because other mobs that shoot things (like Skeletons) still try to hit mobs that they target in their followRange even when they can't reach them.

      Summoning a Skeleton with this command:

      /summon skeleton ~ ~3 ~ {Attributes:[{Name:generic.followRange,Base:100}],NoGravity:1,HandItems:[{id:bow,Count:1},{}],ArmorItems:[{},{},{},{id:stone,Count:1}]}

      And then summoning this zombie:

      /summon zombie ~ ~1 ~ {UUIDLeast:1,UUIDMost:1}

      around 90 blocks away from the skeleton and then using this command:

      /execute @e[type=skeleton] ~ ~ ~ /summon potion ~ ~4 ~ {ownerName:"00000000-0000-0001-0000-000000000001",Potion:{id:"minecraft:splash_potion",Count:1,tag:{CustomPotionEffects:[{Id:6,Amplifier:0,Duration:20,ShowParticles:0b}]}}}

      shows that skeletons still target & shoot mobs even if they can't reach them.

      I tested some more mobs:

      • Strays, Guardians, Evokers & Shulker attack like skeletons
      • Witches aren't attacking like snowmen
      • Blazes are flying up but aren't attacking
      • Withers probably aren't attacking either, but I'm not sure because it only attacked the armorstand I spawned it on so that it wouldn't move. (are they supposed to do that?)

      Some more tests:

      • Snowman, Blazes & Witches both still attack mobs as long as they are in their default follow range, but when they are further away (but still in the custom follow range) they will behave like they have NoAI.
      • Withers aren't attacking the zombie even when it's close, but still have an AI (they always tried to kill an armorstand instead of the zombie so I'm not sure what exactly is wrong with them)
      • Guardians aren't effected by my damage, wither or healing potions and don't attack the zombie because of that, but they still attack squids that are nearly 100 blocks away
      /summon minecraft:armor_stand ~ ~3 ~ {Passengers:[{id:wither,Attributes:[{Name:generic.followRange,Base:100}],NoGravity:1}]}
      /summon minecraft:armor_stand ~ ~3 ~ {Passengers:[{id:guardian,Attributes:[{Name:generic.followRange,Base:100}],NoGravity:1}]}

      Also this bug doesn't happen because of the "NoGravity"-tag.
      It was just an easy way to make the mob not move, but I now tested the same things with entitys on an armorstand instead and they behave the same way:

      /summon minecraft:armor_stand ~ ~3 ~ {Passengers:[{id:snowman,Attributes:[{Name:generic.followRange,Base:100}],Invulnerable:1}]}

      Johnny Vindicators seem to behave in the same way

            Excited Maria Lemón
            McTsts McTsts
            1 Vote for this issue
            5 Start watching this issue