mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-14 19:55:52 -07:00
[Bleeding] Fixed EnderDragon suffocation.
This commit is contained in:
@@ -177,7 +177,7 @@ public abstract class EntityLiving extends Entity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// CraftBukkit start - don't inline the damage, perform it with an event
|
// CraftBukkit start - don't inline the damage, perform it with an event
|
||||||
if (this.isAlive() && this.inBlock()) {
|
if (this.isAlive() && this.inBlock() && !(this instanceof EntityEnderDragon)) { // EnderDragon's don't suffocate.
|
||||||
EntityDamageEvent event = new EntityDamageEvent(this.getBukkitEntity(), EntityDamageEvent.DamageCause.SUFFOCATION, 1);
|
EntityDamageEvent event = new EntityDamageEvent(this.getBukkitEntity(), EntityDamageEvent.DamageCause.SUFFOCATION, 1);
|
||||||
this.world.getServer().getPluginManager().callEvent(event);
|
this.world.getServer().getPluginManager().callEvent(event);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user