1
0
Fork 0
mirror of https://github.com/PaperMC/Paper.git synced 2025-04-05 22:05:20 +02:00

Fire EntityDamageByEntityEvent for unowned wither skulls

This commit is contained in:
RodneyMKay 2024-02-11 20:05:11 +01:00
parent 079a41f4c4
commit a87a5e10d9

View file

@ -11,7 +11,7 @@
public class WitherSkull extends AbstractHurtingProjectile {
@@ -69,7 +73,7 @@
@@ -69,11 +73,11 @@
if (entity.isAlive()) {
EnchantmentHelper.doPostAttackEffects(worldserver, entity, damagesource);
} else {
@ -20,6 +20,11 @@
}
}
} else {
- flag = entity.hurtServer(worldserver, this.damageSources().magic(), 5.0F);
+ flag = entity.hurtServer(worldserver, this.damageSources().magic().customCausingEntity(this), 5.0F); // Paper - Fire EntityDamageByEntityEvent for unowned wither skulls
}
if (flag && entity instanceof LivingEntity entityliving) {
@@ -86,7 +90,7 @@
}