Fix Explosion location - Fixes #3574 (#3826)

This commit is contained in:
Bartosz Stefańczyk 2020-07-06 21:27:19 +02:00 committed by GitHub
parent edfa517d5d
commit 409b47742f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,7 +6,7 @@ Subject: [PATCH] Expand Explosions API
Add Entity as a Source capability, and add more API choices, and on Location. Add Entity as a Source capability, and add more API choices, and on Location.
diff --git a/src/main/java/org/bukkit/Location.java b/src/main/java/org/bukkit/Location.java diff --git a/src/main/java/org/bukkit/Location.java b/src/main/java/org/bukkit/Location.java
index 4cf22afc3c1f1cc19b6e5350043431215908a612..ac3c8eef58872c2de840a4b7ba7d77c2e597aee0 100644 index 4cf22afc3c1f1cc19b6e5350043431215908a612..af2ee43f2c5133668c18710f526a107d94a5d898 100644
--- a/src/main/java/org/bukkit/Location.java --- a/src/main/java/org/bukkit/Location.java
+++ b/src/main/java/org/bukkit/Location.java +++ b/src/main/java/org/bukkit/Location.java
@@ -7,6 +7,7 @@ import java.util.HashMap; @@ -7,6 +7,7 @@ import java.util.HashMap;
@ -99,7 +99,7 @@ index 4cf22afc3c1f1cc19b6e5350043431215908a612..ac3c8eef58872c2de840a4b7ba7d77c2
+ * @return false if explosion was canceled, otherwise true + * @return false if explosion was canceled, otherwise true
+ */ + */
+ public boolean createExplosion(@NotNull Entity source, float power, boolean setFire, boolean breakBlocks) { + public boolean createExplosion(@NotNull Entity source, float power, boolean setFire, boolean breakBlocks) {
+ return this.getWorld().createExplosion(source, source.getLocation(), power, setFire, breakBlocks); + return this.getWorld().createExplosion(source, this, power, setFire, breakBlocks);
+ } + }
+ +
/** /**