[SPIGOT-7977] EntityExplodeEvent - BlockList should be empty for WindCharge explosions Created: 09/Dec/24  Updated: 25/Dec/24

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

Type: Bug Priority: Minor
Reporter: Shane Bee Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None

Attachments: PNG File Screenshot 2024-12-09 at 11.41.12 AM.png     PNG File Screenshot 2024-12-09 at 12.19.32 PM.png     File Test-1.0.0.jar    
Version: CraftBukkit version 4402-Spigot-33ece3e-665900b
Plugin: Just my Test.jar plugin
Guidelines Read: Yes

 Description   

I noticed recently that EntityExplodeEvent#blockList was full of blocks when a WindCharge explodes, even tho no blocks explode when that entity explodes.

Steps to test:

  • Add Test.jar to server
  • Login, grab a "wind charge" item from creative menu
  • Throw it towards a block (it will explode and no blocks will explode)
  • Console will be flooded with blocks that exploded

Test code from Jar:

@EventHandler
private void onExplode(EntityExplodeEvent event) {
    for (Block block : event.blockList()) {
        Bukkit.getConsoleSender().sendMessage("- " + block);
    }
}


 Comments   
Comment by Shane Bee [ 09/Dec/24 ]

For the WindCharge it shows "TRIGGER_BLOCK"
Which the docs state as "Represents an explosion where a block change/update has happened." which seems completely wrong also.

 

Im assuming for WindCharge it should be KEEP

Comment by Doc [ 09/Dec/24 ]

And how about https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntityExplodeEvent.html#getExplosionResult() ?

Comment by Shane Bee [ 09/Dec/24 ]

Apparently not:

Code from screenshot:

@EventHandler
private void onExplode(EntityExplodeEvent event) {
    Bukkit.broadcastMessage("Entity: " + event.getEntity().getType());
    Bukkit.broadcastMessage("BlockListSize: " + event.blockList().size());
    Bukkit.broadcastMessage("Yield: " + event.getYield());
}
Comment by md_5 [ 09/Dec/24 ]

Isn't yield 0?

Generated at Tue Apr 22 07:16:05 UTC 2025 using Jira 10.3.5#10030005-sha1:190c783f2bd6c69cd5accdb70f97e48812a78d14.