mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-16 20:53:54 -07:00
Teach EnderDragon how to throw EntityExplosionEvents when it breaks blocks
We also teach CraftWorld how to explode an event, taken from Explosion.a(boolean) (the code that breaks blocks and drops them on the ground). The EnderDragon has a flag that slows it down when it hits unbreakable blocks: Obsidian, White Stone or Bedrock. It might be useful to extend the event so that plugins can set this. Letting the API set the default yield for an explosion event has been deprecated, so we now set the default yield using the appropriate constructor.
This commit is contained in:
@@ -185,7 +185,7 @@ public class Explosion {
|
||||
}
|
||||
}
|
||||
|
||||
EntityExplodeEvent event = new EntityExplodeEvent(explode, location, blockList);
|
||||
EntityExplodeEvent event = new EntityExplodeEvent(explode, location, blockList, 0.3F);
|
||||
this.world.getServer().getPluginManager().callEvent(event);
|
||||
|
||||
arraylist.clear();
|
||||
|
Reference in New Issue
Block a user