Villager POI Search Range Configs#217
Open
Dueris wants to merge 1 commit intover/26.1.2from
Open
Conversation
coredex-source
approved these changes
May 9, 2026
R00tB33rMan
approved these changes
May 9, 2026
Member
R00tB33rMan
left a comment
There was a problem hiding this comment.
Don’t see any breakages this’d ensue as-is and looks like all sites are covered!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
AcquirePoi searches always run with a range of
48blocks. Villagers have 4 POI types that are run through 3 different behavior controllers in the mob brain, specifically searching forHOME,MEETING,JOB_SITE, andPOTENTIAL_JOB_SITE. Note thatJOB_SITEis the memory to validate andPOTENTIAL_JOB_SITEis the memory to acquire in their shared behavior controller. These POIs are later validated once present via theValidateNearbyPoiclass, which actually validates them in a radius of16blocks, unlike48which is what the initial search is for.With this in mind, there are 3 configs added that shrink the search radius from
48to16, to match the validator. These configs are as such:reduceJobSitePoiSearchRange- Reduces theJOB_SITE/POTENTIAL_JOB_SITEPOI search rangereduceHomePoiSearchRange- Reduces theHOMEPOI search rangereduceMeetingPointPoiSearchRange- Reduces theMEETING_POINTPOI search rangeNote 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.57msof 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.