mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-03 16:04:38 +01:00
[Bleeding] Fix stack overflow with Ender Crystals. Fixes BUKKIT-5583
This commit is contained in:
parent
2bf22a9c49
commit
33e472229e
@ -67,20 +67,20 @@ public class EntityEnderCrystal extends Entity {
|
||||
|
||||
this.b = 0;
|
||||
if (this.b <= 0) {
|
||||
// this.die(); // CraftBukkit - moved down
|
||||
this.die();
|
||||
if (!this.world.isStatic) {
|
||||
// CraftBukkit start
|
||||
ExplosionPrimeEvent event = new ExplosionPrimeEvent(this.getBukkitEntity(), 6.0F, false);
|
||||
this.world.getServer().getPluginManager().callEvent(event);
|
||||
if (event.isCancelled()) {
|
||||
this.dead = false;
|
||||
return false;
|
||||
}
|
||||
this.world.createExplosion(this, this.locX, this.locY, this.locZ, event.getRadius(), event.getFire(), true);
|
||||
}
|
||||
this.die();
|
||||
// CraftBukkit end
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user