Fix dropping in cancelled death event #4290
Merged
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.
Description
Fixes dropping items in a cancelled death event (cancellation is only available on Paper). The code removed was supposed to make item dropping in a death event add it to the event's drops, but this can (and IMO should) be done using the drops or experience expression.
I could've added a condition to make sure the event isn't cancelled, but that would not prevent the bug from happening when the event is cancelled after the drop effect is called.
I also cleaned up the file and merged the two patterns, using a parse mark.
Target Minecraft Versions: any
Requirements: none
Related Issues: #4288