Various mob AI search ranges are now random. This is because some mob logic - see below - switched from hardcoded values to using the FOLLOW_RANGE
attribute in 1.21.2 - likely to make them visible when doing /data get and also adjustable via commands. However, this change neglected the fact that FOLLOW_RANGE
is for all intents are purposes randomly set when spawning - which leads to unpredictable search ranges.
FOLLOW_RANGE
gets modified byRANDOM_SPAWN_BONUS_ID
when used - set to: base_value + base_value * RANDOM_SPAWN_BONUS_ID
. RANDOM_SPAWN_BONUS_ID
is random generated from a triangular distribution - mode is 0, range is +/- 0.11485 - in Mob::finalizeSpawn
which is called when the mob is spawned in. For instance, the NearestLivingEntitySensor
search range expansion can now randomly be between 14.1624 and 17.8376 (base value is 16) - used to be fixed at 16 blocks.
This affects:
Anything that uses
NearestLivingEntitySensor
Notably, this can reduce iron farm efficiency because farms were designed with the fixed 16 block expansion in mind - so some villagers can now detect iron golems when they would not have before.
This may also increase lag in certain farms that utilize the fixed spacing to reduce AI interactions - e.g. bartering
Other mobs affected: Allay, Armadillo, Axolotl, Camel, Breeze, Copper Golem, Creaking, Frog/Tadpole, Goat, Happy Ghast, Hoglin/Zoglin, Piglin Brute, Sniffer, Wardens
Anything that uses
PlayerSensor
Mobs affected: Allay, Breeze, Creaking, Frog/Tadpole, Goat, Happy Ghast, Hoglin/Zoglin, Piglin/Piglin Brute, Sniffer, Villager, Wardens
Anything that uses
BreezeUtil::hasLineOfSight
Breeze LongJump and Slide behaviors
Note: Only listing the code that had fixed values from before 1.21.2. Many more things use FOLLOW_RANGE
in general.
Possible fixes:
New fixed Attribute that are used in the above logic that matches the pre-1.21.2 behavior.
Remove the randomness from
FOLLOW_RANGE
- This can be done by removing theRANDOM_SPAWN_BONUS_ID
logic inMob::finalizeSpawn
I am not aware of anything that will be negatively affected by this. Please comment if I’m missing something.
Comments 5
Can confirm this. Having random stuff in the game is fine for some things but not things like this. It makes a lot of stuff especially on a technical level very unpredictable and unreliable and no one likes to deal with randomness when working on a project. This doesn’t affect just iron farms but a lot of other stuff as well. Ur now basically rolling dice whenever u try to do anything with the mobs that have this.
The resolution of MC-145656: Attribute "follow_range" is not working for hostile mobs before they find the target indicates that Mojang intended follow_range to govern not only pursuit distance but also detection and general search ranges.
Most of the breaking changes in this report are not with hostile mobs. The listed changes in this report are ones which had their search ranges switched to follow range when they were not using it before. Even some hostile mobs listed as breaking do not use all those sensors to for finding and pursuing targets.
Also, the mobs reported in MC-145656 and related reports were already using follow range in their target search range - the issue was likely with commands not updating the internal follow range value not the search logic itself. Most of those mobs do not even use the sensors/logic detailed here.
If the main concern is reduced efficiency in farms due to this change, then the appropriate venue would be the Feedback site, rather than the Bug Tracker, since the issue pertains to design preferences rather than unintended behavior.
This is a change of pre-existing behavior that have been used to make farms in the past. Players updating from 1.21.1 and below have observed that some existing farms have been affected.
Thank you for your report!
After consideration, the issue is being closed as Working as Intended.
Please note, that mechanics of the game may change between updates.
Things such as graphics, sounds, world creation, biomes, redstone, villagers, and animals may not work the same in current versions.
Full Version History – Snapshot Version History – The official Minecraft feedback site
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki
Marking this as WAI is absolutely nonsensical, please reconsider as it feels like purpose of the bug report was ignored. This breaks a lot of technical mechanics that are essential for iron farming, its close to impossible to make a stable 1D iron farm now, but also destroyed niche mechanics that were utilised by the technical community due to their fixed distances.
In my view, this does not constitute a bug but rather appears to be intentional behavior.
The resolution of MC-145656: Attribute "follow_range" is not working for hostile mobs before they find the target indicates that Mojang intended follow_range to govern not only pursuit distance but also detection and general search ranges.
Furthermore, the minecraft:random_spawn_bonus modifier seems deliberately designed to introduce biological diversity and natural variation among mobs, making them appear more dynamic. The fact that it is implemented as a formal attribute modifier with a unique identifier, and explicitly named “random bonus,” strongly suggests intentional design rather than oversight.
If the main concern is reduced efficiency in farms due to this change, then the appropriate venue would be the Feedback site, rather than the Bug Tracker, since the issue pertains to design preferences rather than unintended behavior.