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:
parent
7b03141498
commit
355b1cbaf6
37 changed files with 233 additions and 122 deletions
|
@ -64,10 +64,10 @@ index 0b46ad360be919e4aeb0ffc0eebae9fe712fb861..51e560d7856f230c5aa2dc32706c3a49
|
|||
|
||||
public int get() {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 5ae307f9343ffea39c286992459a6c8069d9fb86..08124dd65d1f950bdec8fcb55d2553c601b30a66 100644
|
||||
index 99fccedaab2600881683140e10ee17377375b911..f698ac90bd3086519f49e92451228415efaf5530 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -1885,8 +1885,13 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@@ -1887,8 +1887,13 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
|
||||
if (!this.isGameRule(rule)) return false;
|
||||
|
||||
|
@ -82,7 +82,7 @@ index 5ae307f9343ffea39c286992459a6c8069d9fb86..08124dd65d1f950bdec8fcb55d2553c6
|
|||
handle.onChanged(this.getHandle());
|
||||
return true;
|
||||
}
|
||||
@@ -1922,8 +1927,12 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@@ -1924,8 +1929,12 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
|
||||
if (!this.isGameRule(rule.getName())) return false;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue