Skip to content

fix: validate region ownership of cached AI targets - #523

Open
PluginsKers wants to merge 1 commit into
PaperMC:ver/26.2.xfrom
PluginsKers:fix/region-owned-ai-sensors-v2
Open

PluginsKers wants to merge 1 commit into
PaperMC:ver/26.2.xfrom
PluginsKers:fix/region-owned-ai-sensors-v2

Conversation

@PluginsKers

Copy link
Copy Markdown

Sensor memories can retain entities after their region ownership changes. Reading those targets can access entity state from the wrong region thread.

Check ownership before evaluating target predicates and cached visibility, before collecting nearby entities, and before BabyFollowAdult reads a cached or event-replaced target. Clear the cached adult memory when its target is no longer owned.

AI tools were used to implement and review the change and write this description.

@PluginsKers
PluginsKers force-pushed the fix/region-owned-ai-sensors-v2 branch from 4f041a1 to 3f588ee Compare October 11, 2026 03:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant