Skip to content

Entity Storage Fixes#838

Merged
LordIdra merged 2 commits into
masterfrom
human/entity-fixes
Jul 3, 2026
Merged

Entity Storage Fixes#838
LordIdra merged 2 commits into
masterfrom
human/entity-fixes

Conversation

@JustAHuman-xD

@JustAHuman-xD JustAHuman-xD commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Currently EntityStorage saves the entities on entity removal, however that behavior is undefined and there is no guarantee that those changes will be persisted, I've changed it to entity unload instead. I also renamed the RebarEntityDeathEvent to be RebarEntityRemoveEvent as the name was misleading, death is not the same as removal, removal can be caused by death, but it isn't implicitly bound to it.

Ive also updated the death handler to listen to the real death event, not ours

  1. because its been renamed and like I said isnt just death
  2. because our event is called on the monitor priority of the root event, so in effect all handlers of our event are forced into monitor priority, so by switching to the actual event and not our own, implementing classes can still listen at any priority

For those reasons the new handler i added for actually handling entity removal, also uses the real event, not ours

@LordIdra

Copy link
Copy Markdown
Contributor

@JustAHuman-xD Just to confirm, have you tested that the new changes work? The old implementation was in the state it was because the paper API was rather inconsistent wrt death/unload events but it has been a while since then, is that no longer the case as far as you can tell?

@JustAHuman-xD

Copy link
Copy Markdown
Contributor Author

@JustAHuman-xD Just to confirm, have you tested that the new changes work? The old implementation was in the state it was because the paper API was rather inconsistent wrt death/unload events but it has been a while since then, is that no longer the case as far as you can tell?

Yeah I was using this on my branch with the RedstoneLink which was using the ghost block entities.

@LordIdra
LordIdra merged commit 5764304 into master Jul 3, 2026
3 checks passed
@LordIdra
LordIdra deleted the human/entity-fixes branch July 3, 2026 15:14
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.

2 participants