-
-
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
Wolf armor gets damaged when EntityDamageEvent is cancelled #10978
Comments
I check internally and looks like the event is called in actuallyHurts (in the final) what is only called if the wolf not has armor (or the damage ignore the wolf armor) currently in upstream is more easy fix that because the event now is created before the actuallyHurts is called and pass the event later to actuallyHurts where can check the cancel state for avoid damage the armor, but Paper has EntityDamageItemEvent what is called for damage in items like the Wolf Armor then you can use that for cancel the damage in Wolf Armor |
Shouldn't EntityDamageItemEvent not even get called for this and just not damage the item? Or maybe not damage the item and call the event in a cancelled state. |
In teory.. but i dont like that solution of just call EntityDamageItemEvent in canceled because that can cause another user cases fails if is just called in that part of code (currently... with the last upstreams changes in teory its just listen the canceled state passed in the hurts methods for wolfs) |
Pretty sure this is the issue you are talking about. https://hub.spigotmc.org/jira/browse/SPIGOT-7815 |
yeah in Upstream was already fixed, but here need handle EntityDamageItemEvent for that until https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/commits/66e78a96b65b15c41e3c180beaa72c390b9d6153#nms-patches%2Fnet%2Fminecraft%2Fworld%2Fentity%2Fanimal%2FEntityWolf.patch is merged here |
Merge |
Expected behavior
Cancelling EntityDamageEvent should prevent wolf armor from taking damage since there's no incoming damage to defend against.
Observed/Actual behavior
Even though EntityDamageEvent is cancelled the wolf armor takes damage and eventually breaks.
Steps/models to reproduce
Create an empty plugin an register the following event
After summoning a wolf tame it and put armor on it. When the wolf gets hit by the player the armor takes damage.
Plugin and Datapack List
Empty/test plugin
Paper version
Other
No response
The text was updated successfully, but these errors were encountered: