Add API for explosions to damage the explosion cause (#11180)

This intends to give plugin developers more control over explosions created using the World#createExplosion method, specifically by adding the option for explosions to damage the explosion cause (not the default behavior, and previously impossible to do, as far as I know). This is done by overloading existing methods with an extra `excludeSourceFromDamage` parameter.

Co-authored-by: Bjarne Koll <lynxplay101@gmail.com>
This commit is contained in:
Esoteric Enderman 2024-09-28 20:32:56 +01:00 committed by GitHub
parent 7b03141498
commit 355b1cbaf6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
37 changed files with 233 additions and 122 deletions

View file

@ -86,10 +86,10 @@ index b8ce1c1c2447f9cff1717bfcfd6eb911ade0d4b3..51f21af9d75769abdcba713b9aa33392
+ // Paper end - more Raid API
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index cb85180daaa2b40cba2474784548d650bc4d639b..50b84939eee044ddadca046079286a72de5c8e04 100644
index f27568d26e02b5244a84d0fb6d8c1d9f14b7a519..e8404d5bad60b8fa290f334d3c64ee5503e01e5c 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -2311,6 +2311,14 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -2313,6 +2313,14 @@ public class CraftWorld extends CraftRegionAccessor implements World {
return (raid == null) ? null : new CraftRaid(raid);
}