Updated Upstream (Bukkit/CraftBukkit)

Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
0399d9d6 SPIGOT-5341: Add Material.isAir
547f5709 SPIGOT-5353: Expand explosion API by adding source entity

CraftBukkit Changes:
7deb3728 SPIGOT-5309: Call cancelled EntityDamageEvent when damaging invisible armor stands
46351e17 SPIGOT-5341: Add Material.isAir
683bae06 SPIGOT-5342: Lore lost when deserializing items with no version stored
c2d12011 SPIGOT-5353: Expand explosion API by adding source entity
This commit is contained in:
Shane Freeder 2019-10-08 19:37:02 +01:00
parent 3398704d7f
commit e8c82f4eee
No known key found for this signature in database
GPG key ID: A3F61EA5A085289C
30 changed files with 196 additions and 210 deletions

View file

@ -1,4 +1,4 @@
From bb553c5f1fecc0bde9c2adf69e47645a07389865 Mon Sep 17 00:00:00 2001
From 6a79e6167bb1cb6969b6953abe148343e8fa0b1c Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Sat, 10 Jun 2017 16:59:40 -0500
Subject: [PATCH] Fix upstream javadoc warnings and errors
@ -6,10 +6,10 @@ Subject: [PATCH] Fix upstream javadoc warnings and errors
Upstream still refuses to use Java 8 with the API so they are likely unaware these are even issues.
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index 58414e01..3cd4bff1 100644
index 767cdf0aa..3858b0576 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -1746,6 +1746,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
@@ -1786,6 +1786,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
* @param count the number of particles
* @param data the data to use for the particle or null,
* the type of this depends on {@link Particle#getDataType()}
@ -17,7 +17,7 @@ index 58414e01..3cd4bff1 100644
*/
public <T> void spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, @Nullable T data);
@@ -1762,6 +1763,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
@@ -1802,6 +1803,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
* @param count the number of particles
* @param data the data to use for the particle or null,
* the type of this depends on {@link Particle#getDataType()}
@ -25,7 +25,7 @@ index 58414e01..3cd4bff1 100644
*/
public <T> void spawnParticle(@NotNull Particle particle, double x, double y, double z, int count, @Nullable T data);
@@ -1812,6 +1814,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
@@ -1852,6 +1854,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
* @param offsetZ the maximum random offset on the Z axis
* @param data the data to use for the particle or null,
* the type of this depends on {@link Particle#getDataType()}
@ -33,7 +33,7 @@ index 58414e01..3cd4bff1 100644
*/
public <T> void spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ, @Nullable T data);
@@ -1832,6 +1835,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
@@ -1872,6 +1875,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
* @param offsetZ the maximum random offset on the Z axis
* @param data the data to use for the particle or null,
* the type of this depends on {@link Particle#getDataType()}
@ -41,7 +41,7 @@ index 58414e01..3cd4bff1 100644
*/
public <T> void spawnParticle(@NotNull Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, @Nullable T data);
@@ -1888,6 +1892,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
@@ -1928,6 +1932,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
* particle used (normally speed)
* @param data the data to use for the particle or null,
* the type of this depends on {@link Particle#getDataType()}
@ -49,7 +49,7 @@ index 58414e01..3cd4bff1 100644
*/
public <T> void spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ, double extra, @Nullable T data);
@@ -1910,6 +1915,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
@@ -1950,6 +1955,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
* particle used (normally speed)
* @param data the data to use for the particle or null,
* the type of this depends on {@link Particle#getDataType()}
@ -57,7 +57,7 @@ index 58414e01..3cd4bff1 100644
*/
public <T> void spawnParticle(@NotNull Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, @Nullable T data);
@@ -1933,6 +1939,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
@@ -1973,6 +1979,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
* @param force whether to send the particle to players within an extended
* range and encourage their client to render it regardless of
* settings
@ -65,7 +65,7 @@ index 58414e01..3cd4bff1 100644
*/
public <T> void spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ, double extra, @Nullable T data, boolean force);
@@ -1958,6 +1965,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
@@ -1998,6 +2005,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
* @param force whether to send the particle to players within an extended
* range and encourage their client to render it regardless of
* settings
@ -74,7 +74,7 @@ index 58414e01..3cd4bff1 100644
public <T> void spawnParticle(@NotNull Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, @Nullable T data, boolean force);
diff --git a/src/main/java/org/bukkit/entity/AreaEffectCloud.java b/src/main/java/org/bukkit/entity/AreaEffectCloud.java
index c2096b53..bca9d365 100644
index c2096b534..bca9d3659 100644
--- a/src/main/java/org/bukkit/entity/AreaEffectCloud.java
+++ b/src/main/java/org/bukkit/entity/AreaEffectCloud.java
@@ -142,6 +142,7 @@ public interface AreaEffectCloud extends Entity {
@ -86,7 +86,7 @@ index c2096b53..bca9d365 100644
<T> void setParticle(@NotNull Particle particle, @Nullable T data);
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index f41545c5..576ad2c6 100644
index f41545c52..576ad2c68 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -461,7 +461,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@ -179,7 +179,7 @@ index f41545c5..576ad2c6 100644
public <T> void spawnParticle(@NotNull Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, @Nullable T data);
diff --git a/src/main/java/org/bukkit/event/player/PlayerMoveEvent.java b/src/main/java/org/bukkit/event/player/PlayerMoveEvent.java
index 1b2267f4..1a58734d 100644
index 1b2267f4e..1a58734d9 100644
--- a/src/main/java/org/bukkit/event/player/PlayerMoveEvent.java
+++ b/src/main/java/org/bukkit/event/player/PlayerMoveEvent.java
@@ -78,7 +78,7 @@ public class PlayerMoveEvent extends PlayerEvent implements Cancellable {
@ -192,5 +192,5 @@ index 1b2267f4..1a58734d 100644
return to;
}
--
2.22.0
2.23.0

View file

@ -1,4 +1,4 @@
From 23f4f165f9e35104affa80198efc5aaddcc1fc22 Mon Sep 17 00:00:00 2001
From 01d4f9b7ba0c84a9fdfb0d5836cfe72149053842 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Tue, 29 Aug 2017 23:58:48 -0400
Subject: [PATCH] Expand World.spawnParticle API and add Builder
@ -10,7 +10,7 @@ This adds a new Builder API which is much friendlier to use.
diff --git a/src/main/java/com/destroystokyo/paper/ParticleBuilder.java b/src/main/java/com/destroystokyo/paper/ParticleBuilder.java
new file mode 100644
index 00000000..06f1602f
index 000000000..06f1602f5
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/ParticleBuilder.java
@@ -0,0 +1,478 @@
@ -493,7 +493,7 @@ index 00000000..06f1602f
+ }
+}
diff --git a/src/main/java/org/bukkit/Particle.java b/src/main/java/org/bukkit/Particle.java
index 68cb7442..69aae30a 100644
index 68cb74420..69aae30a3 100644
--- a/src/main/java/org/bukkit/Particle.java
+++ b/src/main/java/org/bukkit/Particle.java
@@ -92,6 +92,17 @@ public enum Particle {
@ -515,10 +515,10 @@ index 68cb7442..69aae30a 100644
* Options which can be applied to redstone dust particles - a particle
* color and size.
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index 36ec897f..57cc72a1 100644
index c0158a369..fee0f5211 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -2170,7 +2170,57 @@ public interface World extends PluginMessageRecipient, Metadatable {
@@ -2210,7 +2210,57 @@ public interface World extends PluginMessageRecipient, Metadatable {
* the type of this depends on {@link Particle#getDataType()}
* @param <T> Type
*/
@ -578,5 +578,5 @@ index 36ec897f..57cc72a1 100644
/**
* Spawns the particle (the number of times specified by count)
--
2.22.0
2.23.0

View file

@ -1,4 +1,4 @@
From 3fa86b529ef58e6c6640f2e5706ba66fbce7aa72 Mon Sep 17 00:00:00 2001
From 3e08720f1ab03046c754262078e033268f5cef8c 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,7 +6,7 @@ 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 5730d5f4..b226d7e4 100644
index 5730d5f46..b226d7e4c 100644
--- a/src/main/java/org/bukkit/Location.java
+++ b/src/main/java/org/bukkit/Location.java
@@ -7,6 +7,7 @@ import java.util.HashMap;
@ -106,10 +106,10 @@ index 5730d5f4..b226d7e4 100644
* 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 57cc72a1..8c767a0b 100644
index fee0f5211..af5aba4e5 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -1290,6 +1290,102 @@ public interface World extends PluginMessageRecipient, Metadatable {
@@ -1305,6 +1305,88 @@ public interface World extends PluginMessageRecipient, Metadatable {
*/
public boolean createExplosion(@NotNull Location loc, float power, boolean setFire);
@ -193,25 +193,11 @@ index 57cc72a1..8c767a0b 100644
+ public default boolean createExplosion(@NotNull Entity source, float power) {
+ return createExplosion(source, source.getLocation(), power, true, true);
+ }
+
+ /**
+ * Creates explosion at given location with given power and optionally
+ * setting blocks on fire or breaking blocks.
+ *
+ * @param loc Location to blow up
+ * @param power The power of explosion, where 4F is TNT
+ * @param setFire Whether or not to set blocks on fire
+ * @param breakBlocks Whether or not to have blocks be destroyed
+ * @return false if explosion was canceled, otherwise true
+ */
+ public default boolean createExplosion(@NotNull Location loc, float power, boolean setFire, boolean breakBlocks) {
+ return createExplosion(loc.getX(), loc.getY(), loc.getZ(), power, setFire, breakBlocks);
+ }
+ // Paper end
+
/**
* Gets the {@link Environment} type of this world
*
* Creates explosion at given coordinates with given power and optionally
* setting blocks on fire or breaking blocks.
--
2.22.0
2.23.0

View file

@ -1,4 +1,4 @@
From 33d30a4d9fb9124f46d6bac21f5f8d6f7fbb2ff7 Mon Sep 17 00:00:00 2001
From 2db66ce160d3196ba61e28518479a0a679dc0274 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach@zachbr.io>
Date: Wed, 2 Oct 2019 21:24:28 -0500
Subject: [PATCH] Name the specific custom world gen plugin class that throws a
@ -6,10 +6,10 @@ Subject: [PATCH] Name the specific custom world gen plugin class that throws a
diff --git a/src/main/java/org/bukkit/generator/ChunkGenerator.java b/src/main/java/org/bukkit/generator/ChunkGenerator.java
index 9a18a05b..ccac5710 100644
index dd0123338..3fe6a22e0 100644
--- a/src/main/java/org/bukkit/generator/ChunkGenerator.java
+++ b/src/main/java/org/bukkit/generator/ChunkGenerator.java
@@ -76,7 +76,10 @@ public abstract class ChunkGenerator {
@@ -84,7 +84,10 @@ public abstract class ChunkGenerator {
*/
@NotNull
public ChunkData generateChunkData(@NotNull World world, @NotNull Random random, int x, int z, @NotNull BiomeGrid biome) {