Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-18 20:40:08 +01:00
Made snowmen in rain or water fire EntityDamage events with DamageCause DROWNING. Fixes BUKKIT-1165
Dieser Commit ist enthalten in:
Ursprung
373afd1b22
Commit
2a4167d8a5
@ -33,7 +33,12 @@ public class EntitySnowman extends EntityGolem {
|
||||
public void e() {
|
||||
super.e();
|
||||
if (this.aS()) {
|
||||
this.damageEntity(DamageSource.DROWN, 1);
|
||||
EntityDamageEvent event = new EntityDamageEvent(this.getBukkitEntity(), EntityDamageEvent.DamageCause.DROWNING, 1);
|
||||
this.world.getServer().getPluginManager().callEvent(event);
|
||||
|
||||
if (!event.isCancelled()) {
|
||||
this.damageEntity(DamageSource.DROWN, event.getDamage());
|
||||
}
|
||||
}
|
||||
|
||||
int i = MathHelper.floor(this.locX);
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren