Update Upstream
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
From 6014a368344b93d8a67207acca5dce642311dd2b Mon Sep 17 00:00:00 2001
|
||||
From 2715b1aea34fcc2ac427535cba59a5f43bcfafe5 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Tue, 19 Dec 2017 16:24:42 -0500
|
||||
Subject: [PATCH] Expand Explosions API
|
||||
@@ -6,10 +6,10 @@ Subject: [PATCH] Expand Explosions API
|
||||
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
|
||||
index f3ae58ee..b5a6ac16 100644
|
||||
index 5730d5f4..b226d7e4 100644
|
||||
--- a/src/main/java/org/bukkit/Location.java
|
||||
+++ b/src/main/java/org/bukkit/Location.java
|
||||
@@ -4,6 +4,7 @@ import java.util.HashMap;
|
||||
@@ -7,6 +7,7 @@ import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.configuration.serialization.ConfigurationSerializable;
|
||||
@@ -17,7 +17,7 @@ index f3ae58ee..b5a6ac16 100644
|
||||
import org.bukkit.util.NumberConversions;
|
||||
import org.bukkit.util.Vector;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@@ -540,6 +541,87 @@ public class Location implements Cloneable, ConfigurationSerializable {
|
||||
@@ -568,6 +569,87 @@ public class Location implements Cloneable, ConfigurationSerializable {
|
||||
return centerLoc;
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ index f3ae58ee..b5a6ac16 100644
|
||||
+ * @return false if explosion was canceled, otherwise true
|
||||
+ */
|
||||
+ public boolean createExplosion(float power) {
|
||||
+ return world.createExplosion(this, power);
|
||||
+ return this.getWorld().createExplosion(this, power);
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
@@ -44,7 +44,7 @@ index f3ae58ee..b5a6ac16 100644
|
||||
+ * @return false if explosion was canceled, otherwise true
|
||||
+ */
|
||||
+ public boolean createExplosion(float power, boolean setFire) {
|
||||
+ return world.createExplosion(this, power, setFire);
|
||||
+ return this.getWorld().createExplosion(this, power, setFire);
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
@@ -57,7 +57,7 @@ index f3ae58ee..b5a6ac16 100644
|
||||
+ * @return false if explosion was canceled, otherwise true
|
||||
+ */
|
||||
+ public boolean createExplosion(float power, boolean setFire, boolean breakBlocks) {
|
||||
+ return world.createExplosion(this, power, setFire, breakBlocks);
|
||||
+ return this.getWorld().createExplosion(this, power, setFire, breakBlocks);
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
@@ -70,7 +70,7 @@ index f3ae58ee..b5a6ac16 100644
|
||||
+ * @return false if explosion was canceled, otherwise true
|
||||
+ */
|
||||
+ public boolean createExplosion(@Nullable Entity source, float power) {
|
||||
+ return world.createExplosion(source, this, power, true, true);
|
||||
+ return this.getWorld().createExplosion(source, this, power, true, true);
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
@@ -85,7 +85,7 @@ index f3ae58ee..b5a6ac16 100644
|
||||
+ * @return false if explosion was canceled, otherwise true
|
||||
+ */
|
||||
+ public boolean createExplosion(@Nullable Entity source, float power, boolean setFire) {
|
||||
+ return world.createExplosion(source, this, power, setFire, true);
|
||||
+ return this.getWorld().createExplosion(source, this, power, setFire, true);
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
@@ -99,17 +99,17 @@ index f3ae58ee..b5a6ac16 100644
|
||||
+ * @return false if explosion was canceled, otherwise true
|
||||
+ */
|
||||
+ public boolean createExplosion(@NotNull Entity source, float power, boolean setFire, boolean breakBlocks) {
|
||||
+ return world.createExplosion(source, source.getLocation(), power, setFire, breakBlocks);
|
||||
+ return this.getWorld().createExplosion(source, source.getLocation(), power, setFire, breakBlocks);
|
||||
+ }
|
||||
+
|
||||
/**
|
||||
* Returns a list of entities within a bounding box centered around a Location.
|
||||
*
|
||||
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
||||
index a709ac47..9579437b 100644
|
||||
index 28afb932..eb5860b2 100644
|
||||
--- a/src/main/java/org/bukkit/World.java
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -1188,6 +1188,102 @@ public interface World extends PluginMessageRecipient, Metadatable {
|
||||
@@ -1201,6 +1201,102 @@ public interface World extends PluginMessageRecipient, Metadatable {
|
||||
*/
|
||||
public boolean createExplosion(@NotNull Location loc, float power, boolean setFire);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user