Skip to content

Villager POI Search Range Configs#217

Open
Dueris wants to merge 1 commit intover/26.1.2from
feat/reduce-poi-search-range-conf
Open

Villager POI Search Range Configs#217
Dueris wants to merge 1 commit intover/26.1.2from
feat/reduce-poi-search-range-conf

Conversation

@Dueris
Copy link
Copy Markdown
Member

@Dueris Dueris commented May 8, 2026

AcquirePoi searches always run with a range of 48 blocks. Villagers have 4 POI types that are run through 3 different behavior controllers in the mob brain, specifically searching for HOME, MEETING, JOB_SITE, and POTENTIAL_JOB_SITE. Note that JOB_SITE is the memory to validate and POTENTIAL_JOB_SITE is the memory to acquire in their shared behavior controller. These POIs are later validated once present via the ValidateNearbyPoi class, which actually validates them in a radius of 16 blocks, unlike 48 which is what the initial search is for.

With this in mind, there are 3 configs added that shrink the search radius from 48 to 16, to match the validator. These configs are as such:

  • reduceJobSitePoiSearchRange - Reduces the JOB_SITE/POTENTIAL_JOB_SITE POI search range
  • reduceHomePoiSearchRange - Reduces the HOME POI search range
  • reduceMeetingPointPoiSearchRange - Reduces the MEETING_POINT POI search range

Note that these configs are in kebab-case for the actual YAML config

This PR also disables these 3 behavior controllers from loading POI chunks if the chunk isn't currently loaded. There were some noticeable MSPT improvements, being roughly 18.21ms -> 13.57ms of Villager ticking(inactive tick included), in a single region with ~585 villagers. While not the most impactful optimization, this does help optimize the current heaviest behavior controllers for Villagers in Canvas, which is at least something.

Note that these options do cause slight deviation from Vanilla, however probably not entirely noticeable to the average player.

Copy link
Copy Markdown
Contributor

@MrMasrozYTLIVE MrMasrozYTLIVE left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm

Copy link
Copy Markdown
Member

@R00tB33rMan R00tB33rMan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don’t see any breakages this’d ensue as-is and looks like all sites are covered!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants