
Mace smash attack AoE knockback not handled
Wertik opened this issue ยท 4 comments
WorldEdit Version
7.3.10
WorldGuard Version
7.0.13
Platform Version
Paper version 1.21.4-204-main@3d13b11
Confirmations
- I am using the most recent Minecraft release.
- I am using a version of WorldEdit compatible with my Minecraft version.
- I am using a version of WorldGuard compatible with my Minecraft version.
- I am using the latest or recommended version of my platform software.
- I am NOT using a hybrid server, e.g. a server that combines Bukkit and Forge. Examples include Arclight, Mohist, and Cardboard.
- I am NOT using a fork of WorldEdit, such as FastAsyncWorldEdit (FAWE) or AsyncWorldEdit (AWE)
Bug Description
Hitting a mob with a mace and causing a smash attack (falling from >1.5 blocks before hitting) in a region that has pvp: deny
causes an AoE knockback effect that knocks other entities as well. This results in the ability of players to knock others out of a region by indirectly hitting other mobs with this attack. (assuming animal / mob harm is allowed to land the attack)
Even with animal harm denied it's still possible to do this with mobs.
Expected Behavior
The indirect knockback resulting from the smash attack AoE being denied.
Reproduction Steps
- Set up a region with flags:
pvp: deny
- Have a player and another mob standing close to each other
- Jump from >1.5 blocks and hit the mob with a mace causing a smash attack
Result the other player gets sent flying away
Optional WorldGuard-Report
No response
Anything Else?
Fixing this issue most likely requires Paper and Spigot calling EntityKnockbackByEntityEvent
on other entities affected by the smash attack AoE. This does not yet happen, however I've opened an issue with both to see if that were possible.
If I understand correctly since Paper hardforked they are not pulling changes from Spigot, hence two reports.
Paper issue
Spigot issue
I am not sure what changes would be required in WG for this to be protected properly. My assumptions would be either include this behaviour under the pvp flag or create a flag specifically for knockback.
There is also EntityAttemptSmashAttackEvent
available on Paper that could be used to deny using smash attacks specifically. Adding a flag for that is also what I did in order to overcome the issue. (and tried submitting a PR to WG extra flags)
Relevant discussion on the discord server: https://discordapp.com/channels/80853743897149440/470410381597343753/1282704841226850365
God, I missclicked on close issue instead of simply posting a comment. Could we get this reopened?
PR adding EntityPushedByEntityAttackEvent
to get called for the AoE got merged into Paper. However I the solutions will differ between Spigot and Paper. No response about the issue on Spigot other than md5 asking what's AoE.
Thanks.
With paper and spigot diverging and wg switching to paper-api recently (I think I saw a commit removing spigot-api from deps), will this get implemented for paper only or do we wait?
I could also try and make a PR fixing this issue but I'm not sure how to approach this and not really familiar with the codebase.