From 1a45fc25f50316927ec6979fc283f3e1729c5635 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 24 Jun 2020 22:33:35 -0400 Subject: [PATCH] API update --- Spigot-API-Patches/Add-Material-Tags.patch | 40 +++++++++---------- ...low-plugins-to-use-SLF4J-for-logging.patch | 2 +- Spigot-API-Patches/Fireworks-API-s.patch | 18 ++------- Spigot-API-Patches/POM-changes.patch | 9 +---- Spigot-API-Patches/Potential-bed-API.patch | 33 +++++++++++++-- .../Use-ASM-for-event-executors.patch | 2 +- 6 files changed, 56 insertions(+), 48 deletions(-) diff --git a/Spigot-API-Patches/Add-Material-Tags.patch b/Spigot-API-Patches/Add-Material-Tags.patch index 077cc2fbff..327145a9de 100644 --- a/Spigot-API-Patches/Add-Material-Tags.patch +++ b/Spigot-API-Patches/Add-Material-Tags.patch @@ -313,18 +313,18 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + .ensureSize("DYES", 16); + + /** -+ * Covers all 6 wood variants of gates. ++ * Covers all variants of gates. + */ + public static final MaterialSetTag FENCE_GATES = new MaterialSetTag(keyFor("fence_gates")) + .endsWith("_GATE") -+ .ensureSize("FENCE_GATES", 6); ++ .ensureSize("FENCE_GATES", 8); + + /** -+ * Covers all 6 wood variants and nether brick fence. ++ * Covers all variants of fences. + */ + public static final MaterialSetTag FENCES = new MaterialSetTag(keyFor("fences")) + .endsWith("_FENCE") -+ .ensureSize("FENCES", 7); ++ .ensureSize("FENCES", 9); + + /** + * Covers all 4 variants of fish buckets. @@ -407,18 +407,18 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + .add(Material.BROWN_MUSHROOM, Material.RED_MUSHROOM); + + /** -+ * Covers all 12 music disc items. ++ * Covers all music disc items. + */ + public static final MaterialSetTag MUSIC_DISCS = new MaterialSetTag(keyFor("music_discs")) -+ .startsWith("MUSIC_DISC_") -+ .ensureSize("MUSIC_DISCS", 12); ++ .startsWith("MUSIC_DISC_"); + + /** -+ * Covers all 8 ores. ++ * Covers all ores. + */ + public static final MaterialSetTag ORES = new MaterialSetTag(keyFor("ores")) ++ .add(Material.ANCIENT_DEBRIS) + .endsWith("_ORE") -+ .ensureSize("ORES", 8); ++ .ensureSize("ORES", 10); + + /** + * Covers all piston typed items and blocks including the piston head and moving piston. @@ -435,11 +435,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + .ensureSize("POTATOES", 3); + + /** -+ * Covers all 6 wooden pressure plates and the 2 weighted pressure plates and 1 stone pressure plate. ++ * Covers all wooden pressure plates and the weighted pressure plates and 1 stone pressure plate. + */ + public static final MaterialSetTag PRESSURE_PLATES = new MaterialSetTag(keyFor("pressure_plates")) + .endsWith("_PRESSURE_PLATE") -+ .ensureSize("PRESSURE_PLATES", 9); ++ .ensureSize("PRESSURE_PLATES", 12); + + /** + * Covers the 3 variants of prismarine blocks. @@ -518,7 +518,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + */ + public static final MaterialSetTag SPAWN_EGGS = new MaterialSetTag(keyFor("spawn_eggs")) + .endsWith("_SPAWN_EGG") -+ .ensureSize("SPAWN_EGGS", 59); ++ .ensureSize("SPAWN_EGGS", 63); + + /** + * Covers all 16 colors of stained glass. @@ -535,31 +535,31 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + .ensureSize("STAINED_GLASS_PANES", 16); + + /** -+ * Covers all 7 variants of trapdoors. ++ * Covers all variants of trapdoors. + */ + public static final MaterialSetTag TRAPDOORS = new MaterialSetTag(keyFor("trapdoors")) + .endsWith("_TRAPDOOR") -+ .ensureSize("TRAPDOORS", 7); ++ .ensureSize("TRAPDOORS", 9); + + /** -+ * Covers all 6 wood variants of fences. ++ * Covers all wood variants of fences. + */ + public static final MaterialSetTag WOODEN_FENCES = new MaterialSetTag(keyFor("wooden_fences")) + .endsWith("_FENCE") + .not(Material.NETHER_BRICK_FENCE) -+ .ensureSize("WOODEN_FENCES", 6); ++ .ensureSize("WOODEN_FENCES", 8); + + /** -+ * Covers all 6 wood variants of trapdoors. ++ * Covers all wood variants of trapdoors. + */ + public static final MaterialSetTag WOODEN_TRAPDOORS = new MaterialSetTag(keyFor("wooden_trapdoors")) + .endsWith("_TRAPDOOR") + .not(Material.IRON_TRAPDOOR) -+ .ensureSize("WOODEN_TRAPDOORS", 6); ++ .ensureSize("WOODEN_TRAPDOORS", 8); + + public static final MaterialSetTag WOODEN_GATES = new MaterialSetTag(keyFor("wooden_gates")) + .endsWith("_GATE") -+ .ensureSize("WOODEN_GATES", 6); ++ .ensureSize("WOODEN_GATES", 8); + + public static final MaterialSetTag PURPUR = new MaterialSetTag(keyFor("purpur")) + .startsWith("PURPUR_") @@ -567,7 +567,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + + public static final MaterialSetTag SIGNS = new MaterialSetTag(keyFor("signs")) + .endsWith("_SIGN") -+ .ensureSize("SIGNS", 12); ++ .ensureSize("SIGNS", 16); + + public static final MaterialSetTag TORCH = new MaterialSetTag(keyFor("torch")) + .add(Material.TORCH, Material.WALL_TORCH) diff --git a/Spigot-API-Patches/Allow-plugins-to-use-SLF4J-for-logging.patch b/Spigot-API-Patches/Allow-plugins-to-use-SLF4J-for-logging.patch index 6cb7c490bb..d73b94e9ce 100644 --- a/Spigot-API-Patches/Allow-plugins-to-use-SLF4J-for-logging.patch +++ b/Spigot-API-Patches/Allow-plugins-to-use-SLF4J-for-logging.patch @@ -18,7 +18,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/pom.xml +++ b/pom.xml @@ -0,0 +0,0 @@ - 18.0.0 + 19.0.0 provided + diff --git a/Spigot-API-Patches/Fireworks-API-s.patch b/Spigot-API-Patches/Fireworks-API-s.patch index 9be2c8750b..13f1350920 100644 --- a/Spigot-API-Patches/Fireworks-API-s.patch +++ b/Spigot-API-Patches/Fireworks-API-s.patch @@ -10,29 +10,19 @@ diff --git a/src/main/java/org/bukkit/entity/Firework.java b/src/main/java/org/b index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/bukkit/entity/Firework.java +++ b/src/main/java/org/bukkit/entity/Firework.java -@@ -0,0 +0,0 @@ package org.bukkit.entity; - import org.bukkit.inventory.meta.FireworkMeta; - import org.jetbrains.annotations.NotNull; - -+import java.util.UUID; -+import org.jetbrains.annotations.Nullable; -+ - public interface Firework extends Entity { - - /** -@@ -0,0 +0,0 @@ public interface Firework extends Entity { +@@ -0,0 +0,0 @@ public interface Firework extends Projectile { * @param shotAtAngle the new shotAtAngle */ void setShotAtAngle(boolean shotAtAngle); + + // Paper start -+ @Nullable -+ public UUID getSpawningEntity(); ++ @org.jetbrains.annotations.Nullable ++ public java.util.UUID getSpawningEntity(); + /** + * If this firework is boosting an entity, return it + * @return The entity being boosted + */ -+ @Nullable ++ @org.jetbrains.annotations.Nullable + public LivingEntity getBoostedEntity(); + // Paper end } diff --git a/Spigot-API-Patches/POM-changes.patch b/Spigot-API-Patches/POM-changes.patch index db82c76e90..ca290017ed 100644 --- a/Spigot-API-Patches/POM-changes.patch +++ b/Spigot-API-Patches/POM-changes.patch @@ -22,7 +22,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - spigot-api + com.destroystokyo.paper + paper-api - 1.15.2-R0.1-SNAPSHOT + 1.16.1-R0.1-SNAPSHOT jar - Spigot-API @@ -86,13 +86,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 com.google.guava @@ -0,0 +0,0 @@ - - org.ow2.asm - asm-tree -- 7.3.1 -+ 8.0.1 - test - diff --git a/Spigot-API-Patches/Potential-bed-API.patch b/Spigot-API-Patches/Potential-bed-API.patch index 272af16d0f..e6e0b4f696 100644 --- a/Spigot-API-Patches/Potential-bed-API.patch +++ b/Spigot-API-Patches/Potential-bed-API.patch @@ -12,9 +12,18 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/org/bukkit/entity/HumanEntity.java +++ b/src/main/java/org/bukkit/entity/HumanEntity.java @@ -0,0 +0,0 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder - @Nullable - public Location getBedSpawnLocation(); + */ + public int getSleepTicks(); ++ /** ++ * Gets the Location where the player will spawn at their bed, null if ++ * they have not slept in one or their current bed spawn is invalid. ++ * ++ * @return Bed Spawn Location if bed exists, otherwise null. ++ */ ++ @Nullable ++ public Location getBedSpawnLocation(); ++ + // Paper start - Potential bed api + /** + * Gets the Location of the player's bed, null if they have not slept @@ -26,7 +35,23 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + @Nullable + public Location getPotentialBedLocation(); + // Paper end ++ ++ /** ++ * Sets the Location where the player will spawn at their bed. ++ * ++ * @param location where to set the respawn location ++ */ ++ public void setBedSpawnLocation(@Nullable Location location); ++ ++ /** ++ * Sets the Location where the player will spawn at their bed. ++ * ++ * @param location where to set the respawn location ++ * @param force whether to forcefully set the respawn location even if a ++ * valid bed is not present ++ */ ++ public void setBedSpawnLocation(@Nullable Location location, boolean force); + /** - * Sets the Location where the player will spawn at their bed. - * + * Attempts to make the entity sleep at the given location. + *
diff --git a/Spigot-API-Patches/Use-ASM-for-event-executors.patch b/Spigot-API-Patches/Use-ASM-for-event-executors.patch index 7c5e515953..602d2ebef2 100644 --- a/Spigot-API-Patches/Use-ASM-for-event-executors.patch +++ b/Spigot-API-Patches/Use-ASM-for-event-executors.patch @@ -10,7 +10,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/pom.xml +++ b/pom.xml @@ -0,0 +0,0 @@ - 8.0.1 + 8.0.1 test
+