-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add removal reason to EntityRemoveFromWorldEvent #10149
Conversation
7c58493
to
39b9d10
Compare
68721e7
to
80d564f
Compare
80d564f
to
1afe820
Compare
We should expose upstreams resasons here too.
Given upstream has merged into an entity remove from world event, can you expand this PR to include the new reasons? Would be fixing #10280 |
Yes please! |
abb4c83
to
94119a3
Compare
Updated the PR to include the causes upstream added. Also moved the primary event call to |
94119a3
to
0790c7e
Compare
0790c7e
to
d073da4
Compare
d073da4
to
6cf0de6
Compare
Rebased. Also removed some unneeded diff. |
Adds a removal reason to
EntityRemoveFromWorldEvent
. TheRemovalReason
enum mirrors the NMSEntity.RemovalReason
, except that the methodsshouldDestroy
/shouldSave
are renamed towillDestroy
/willSave
. Due to the chunk system rewrite, unloaded entities are not set as removed withRemovalReason.UNLOAD_TO_CHUNK
, so currently if the removal reason is not set and the entity is inaccessible, it'll default toRemovalReason.UNLOAD_TO_CHUNK
as the removal reason.