-
Bug
-
Resolution: Fixed
-
20w19a, 1.16.4, 20w51a, 1.20.5
-
Confirmed
-
Commands, Data Packs, Mob behaviour
-
Low
-
Gameplay
Piglins are not affected by the /attribute command when modifying the follow_range attribute. The command is effective on piglins when using other attributes such as movement_speed. I compared two piglins with different follow_ranges in the attached screenshots. The red blocks indicate at which point they would begin to shoot at me, the green block indicates when they would lock on to me with their crossbows, and the blue block indicates when they would lose focus on me. The pillager is used for reference to show that the follow_range attribute was working on other mobs. The commands I used to modify the piglin wasÂ
/attribute @e[type=minecraft:piglin,limit=1,sort=nearest] minecraft:generic.follow_range base set 2