Release 1.28.3#272
Merged
Merged
Conversation
Fix entity counts drifting after server restart
…h tests Follow-up to #270. Now that onEntityAddToWorld re-populates entityIslandMap on chunk reload, entries can safely be dropped on chunk unload — previously they were retained because nothing rebuilt them, which (after #270 mapped every loaded entity) let the map grow unbounded for entities that never reload. onEntityRemove now removes the UUID on the UNLOAD cause. Also drops the no-op ignoreCancelled on the onEntityAddToWorld handler (EntityAddToWorldEvent is not Cancellable) and adds JUnit coverage for the new handler and the eviction: - map population for loaded living entities - non-tracked entities, non-game-mode worlds and spawn islands skipped - already-mapped entities skipped without a redundant getIslandAt lookup - UNLOAD evicts the mapping without decrementing the count - a reloaded entity that dies off-island still decrements (the #270 bug) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Evict entityIslandMap on chunk unload + tests for restart-drift fix
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
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.



Release 1.28.3 — merges
developintomaster.Changes since 1.28.2
entityIslandMapwas in-memory only and lost on restart; entities reloaded from chunks never re-entered it, so off-island deaths/despawns failed to decrement. A newEntityAddToWorldEventhandler repopulates the map on chunk/server load.entityIslandMapon chunk unload + tests (Evict entityIslandMap on chunk unload + tests for restart-drift fix #271) — follow-up: now that the map is rebuilt on reload, entries are dropped on chunk unload to prevent unbounded growth; also removes a no-opignoreCancelledand adds JUnit coverage for the new handler and the restart-drift regression.🤖 Generated with Claude Code