Mojira Archive
MC-32579

Attribute "followRange" Not Working Thoroughly

The attribute "followRange" works for only a portion of mobs. When set to 0, mobs should be expected to not target the player (unless the player happens to be standing in the same spot as the mob). When set to a high number, such as 100, mobs are expected to follow the player even when they are out of the mobs default followRange. This is only true for certain mobs.

The attribute works as intended with:
1. Creepers
2. Zombies
3. Skeletons
4. Witches
5. Iron golems
6. Snow golems

The attribute does not work with:
1. Spiders
2. Cave spiders
3. Silverfish
4. Endermen
5. Slimes
6. Magma cubes
7. Zombie pigmen
8. Blaze
9. Ghasts

I am unsure about:
1. Wolves

The Wither has an interesting effect. The main boss' head won't target or chase you, but the two extra heads will continuously fire at you.

There is no effect on the Enderdragon, but I assume that's working as intended.

An example, summoning a Creeper with a 'followRange' of 0 (working as expected):

summon Creeper ~ ~1 ~ {
	Attributes:[
		{
			Name:generic.followRange,
			Base:0
		}
	]
}

(Note you do not need to include the Modifiers tag if you aren't going to modify the Base; regardless, adding them makes no difference)

And an example with a Spider, which does not work:

summon Spider ~ ~1 ~ {
	Attributes:[
		{
			Name:generic.followRange,
			Base:0
		}
	]
}