Paper icon indicating copy to clipboard operation
Paper copied to clipboard

Add the ability to throttle inactive goal selector ticking for mobs

Open Toffikk opened this issue 6 months ago • 1 comments

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

511222436_1549263803125218_5186593274239383573_n

after: https://spark.lucko.me/08hDQO2qRV

514605952_1085057596880562_1567761830096061681_n

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

Toffikk avatar Jul 01 '25 16:07 Toffikk

rebased to 1.21.9

Toffikk avatar Oct 03 '25 13:10 Toffikk