3
0
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:
EvilSeph 2012-03-14 01:29:02 -04:00
Ursprung 373afd1b22
Commit 2a4167d8a5

Datei anzeigen

@ -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);