Add the ability to throttle inactive goal selector ticking for mobs
Original author: Kevin Raneri [email protected] taken from this pufferfish patch
This change implements a new per-world configuration to throttle far away mob goal selector ticks, which can help with performance in heavy entity load situations, but is defaulted to false as it might introduce slight inconsistencies when enabled, however the inconsistencies should be unnoticeable to most.
The new behavior aims to throttle the goal selector of inactive mobs to tick once in every 20 ticks or in human language once a second.
Spark reports concluded on ~500 entities:
before: https://spark.lucko.me/iDreuGZkdL
after: https://spark.lucko.me/08hDQO2qRV
As we can see we gathered an extra 0.03% gain which while not that substantial, scales a lot higher with higher far-away entity counts and can provide a lot better results which are worth it for servers that have a lot of farms.
will open a docs pr if approved
rebased to 1.21.9