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 <git@lynxplay.dev>
This commit is contained in:
@@ -27719,8 +27719,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
--- a/src/main/java/net/minecraft/world/level/Explosion.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Explosion.java
|
||||
@@ -0,0 +0,0 @@ public class Explosion {
|
||||
public float yield;
|
||||
// CraftBukkit end
|
||||
public boolean excludeSourceFromDamage = true; // Paper - Allow explosions to damage source
|
||||
|
||||
+ // Paper start - optimise collisions
|
||||
+ private static final double[] CACHED_RAYS;
|
||||
|
||||
Reference in New Issue
Block a user