[SPIGOT-738] HangingBreakByEntityEvent for exploding Projectiles Created: 25/Mar/15  Updated: 26/May/15  Resolved: 26/May/15

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

Type: New Feature
Reporter: Nathan Wolf Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None

Attachments: PNG File 2015-03-25_08.24.21.png    

 Description   

This is more of a suggestion than a new feature request.

Would it be possible to generate a HangingBreakByEntityEvent for Hanging entities broken by explosions created by projectiles (Fireball, WitherSkull)?

This seems to be the case for PrimedTNT, but only a hanging item hit directly by a Fireball generates the HBBEE, ones broken by the explosion only generate HangingBreakEvent. This makes me think the issue is something with explosion damage sources, rather than the hanging breakage not getting detected in an explosion- though I could be wrong.

Here are examples of both, and the events triggered:

http://pastebin.com/NwcUtAhG

Included a screenshot of my set up for clarity- I'm using LivingEntity.launchProjectile to launch a LargeFireball from the Player.

My goal is to track damage done by projectiles for rollback, but the way the events are set up now makes it a little difficult to completely tracking Hanging entities breaking.



 Comments   
Comment by Nathan Wolf [ 26/May/15 ]

Confirmed fixed, I can now rollback hanging entities broken by fireballs- thank you!

Comment by Nathan Wolf [ 14/May/15 ]

I have identified the core issue with this and am going to put together a PR.

The offending code is in Explosion.c(), it is checking explicitly for PrimedTNT - I think it should check for Fireball as well, and refer the shooter.

Generated at Sat Dec 13 22:30:28 UTC 2025 using Jira 10.3.13#10030013-sha1:56dd970ae30ebfeda3a697d25be1f6388b68a422.