[SPIGOT-7967] Mace attacks that hit players do not throw EntityExplodeEvent when affecting nearby blocks. Created: 27/Nov/24  Updated: 15/Jan/25  Resolved: 15/Jan/25

Status: Resolved
Project: Spigot
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Llm Dl Assignee: Doc
Resolution: Fixed Votes: 0
Labels: mace
Environment:

n/a


Version:  This server is running CraftBukkit version 4386-Spigot-e65d67a-e9447dc (MC: 1.21.3)
Guidelines Read: Yes

 Description   

I have run into a similar issue to this ticket: https://hub.spigotmc.org/jira/browse/SPIGOT-7830

 

But I have had it pointed out that mace-smash-attacks which hit entities cause a similar wind attack. This wind charge is able to hit players for damage and alter the state of doors, trap doors, gates, levers etc. There is no EntityExplodeEvent thrown for this attack, and protection plugins can no longer protect the state of these doors, levers, etc.

 

In the case of the normal wind charge use, the wind charge will hit something and a list of exploded blocks is received from the EntityExplodeEvent, which a plugin can then alter. In the case of a mace smash attack-generated wind charge there is no way to modify what blocks are affected.

 

Please consider bringing the same EntityExplodeEvent to the wind charge that explodes when a mace smash attack hits something.

 

Thank you.



 Comments   
Comment by Doc [ 15/Jan/25 ]

PR merged now the explode events are correctly called for explosions with not damage in blocks and for explosión effect by players

Comment by Llm Dl [ 15/Dec/24 ]

I just realized a foolish oversight I made and will be re-testing.

Comment by Doc [ 15/Dec/24 ]

LlmDl looks like its not detecting correctly the JDK try just run the nornal buildtools or the gui version for discard any configuration, if need more help you can contact me via discord

Comment by Llm Dl [ 15/Dec/24 ]

Doc I have not had any luck with getting buildtools to run for some reason, and so I have not been able to test it. 

I get this even though I have set up 

[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?

even though I have things set up correctly:

PS C:\Users\Workstation> mvn -version
Apache Maven 3.8.6 (84538c9988a25aec085021c365c560670ad80f63)
Maven home: C:\ProgramData\Maven\apache-maven-3.8.6
Java version: 21.0.4, vendor: Eclipse Adoptium, runtime: C:\Program Files\Eclipse Adoptium\jdk-21.0.4.7-hotspot
Default locale: en_CA, platform encoding: UTF-8
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
Comment by Doc [ 11/Dec/24 ]

another update...

i remake the PR ( https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/pull-requests/887/overview ) for handle original thing about call the event when gamerule for griefing is false.. and also include a improvement for try handle this case.

you can test in teory with:

java -jar BuildTools.jar --rev 1.21.4 --compile spigot --pr craftbukkit:887 

 

Comment by Doc [ 11/Dec/24 ]

 little update in this...

Currently the event fired is BlockExplodeEvent this because the ExplodeEffect used for the enchantment is defined with the behaviour for no damagetype and not attribute the effect to the entity who use the effect (ref: https://minecraft.wiki/w/Enchantment_definition#explode )

Then this need a little check for how handle this and not causing a vanilla change behaviour

Comment by Doc [ 08/Dec/24 ]

A little issues with time...

but i dont touch this because not sure if is valid handle this.. mostly the PR was waiting for the change behaviour. its waiting comments but pretty sure if aprove need remake the whole PR for the last changes since that PR

Comment by Llm Dl [ 08/Dec/24 ]

Doc did you have any luck making this throw the missing event?

Comment by Doc [ 27/Nov/24 ]

Ok the enchantment Wind Burst use the ExplosionEffect and that call a method for explosion. you need add that enchantment for the explosion..

 

I check the code and the issue.. well not a issue is how the event was created.. this just is called if the explosion interacts with blocks, and the ExplosionEffect used in that enchantment is "trigger" and not the related to "destroy"

 

this remind me a old PR https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/pull-requests/887/overview where the event its not called if the gamerule for griefing is true making hard to listen explode... a little old mostly because the event was designed for the work with blocks i think and not think in how currently explosion happen for another things...

 

Comment by Llm Dl [ 27/Nov/24 ]

Black-Hole I have tested it myself and it does affect the nearby blocks. Testing it is easy, just smash attack someone stood in front of a wooden door. The effect will cause knockback, particles and the door to open.

 

Doc yes it is the new smash attack mechanic.

 

I am not surprised that spigot's code doesn't show it happen, as it is as though Spigot throws no event for this at all. It would appear that Minecraft is causing the door to open, as it is a wind charge attack.

Comment by Black Hole [ 27/Nov/24 ]

It seems to be related to the Wind Burst enchantment. But looking at the code, it only applies knockback (for which no event is thrown) and won't alter block states.

Comment by Doc [ 27/Nov/24 ]

You talk about the smash attack? if im not wrong this attack not make any "explosion" just apply knockback and particles.

unless in bad understanding the issue.

Generated at Sun Mar 30 02:36:43 UTC 2025 using Jira 10.3.3#10030003-sha1:d220e3fefc8dfc6d47f522d3b9a20c1455e12b7b.