From 5cfd92b24066f54aa91b7a655621e3f22814df04 Mon Sep 17 00:00:00 2001
From: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
Date: Tue, 23 Apr 2024 14:47:29 -0700
Subject: [PATCH] Fix api compile
---
...xpand-World.spawnParticle-API-and-add-Builder.patch | 4 ++--
patches/api/0173-Fix-Spigot-annotation-mistakes.patch | 10 +++-------
patches/api/0201-Support-components-in-ItemMeta.patch | 6 +++---
3 files changed, 8 insertions(+), 12 deletions(-)
diff --git a/patches/api/0101-Expand-World.spawnParticle-API-and-add-Builder.patch b/patches/api/0101-Expand-World.spawnParticle-API-and-add-Builder.patch
index 6d7aa33b1..c4d635ba0 100644
--- a/patches/api/0101-Expand-World.spawnParticle-API-and-add-Builder.patch
+++ b/patches/api/0101-Expand-World.spawnParticle-API-and-add-Builder.patch
@@ -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 0000000000000000000000000000000000000000..507343f971fd42eada8ce3346b025daa9aadb7a2
+index 0000000000000000000000000000000000000000..e63aabacac12a153ee8f413b529629192cea6900
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/ParticleBuilder.java
@@ -0,0 +1,579 @@
@@ -473,7 +473,7 @@ index 0000000000000000000000000000000000000000..507343f971fd42eada8ce3346b025daa
+ */
+ @NotNull
+ public ParticleBuilder color(@Nullable Color color, float size) {
-+ if (particle != Particle.REDSTONE && color != null) {
++ if (particle != Particle.DUST && color != null) {
+ throw new IllegalStateException("Color may only be set on REDSTONE");
+ }
+
diff --git a/patches/api/0173-Fix-Spigot-annotation-mistakes.patch b/patches/api/0173-Fix-Spigot-annotation-mistakes.patch
index afaaad281..441342199 100644
--- a/patches/api/0173-Fix-Spigot-annotation-mistakes.patch
+++ b/patches/api/0173-Fix-Spigot-annotation-mistakes.patch
@@ -1580,7 +1580,7 @@ index 597a18a767b68b47e81454b7d44613c7178c1366..bc3440eb72127824b3961fbdae583bb6
public ItemStack getInput() {
return this.ingredient.getItemStack();
diff --git a/src/main/java/org/bukkit/inventory/meta/ItemMeta.java b/src/main/java/org/bukkit/inventory/meta/ItemMeta.java
-index de38d9b667e04852c7bdccfa17cbabb1512f4c19..348ad8932fc55830f83ccc60d5cc4aaf8a29d164 100644
+index de38d9b667e04852c7bdccfa17cbabb1512f4c19..e1edd463b522a0f610b82917654b7d87ffc3de22 100644
--- a/src/main/java/org/bukkit/inventory/meta/ItemMeta.java
+++ b/src/main/java/org/bukkit/inventory/meta/ItemMeta.java
@@ -111,6 +111,7 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
@@ -1591,7 +1591,7 @@ index de38d9b667e04852c7bdccfa17cbabb1512f4c19..348ad8932fc55830f83ccc60d5cc4aaf
* @return true if this has a localized name
* @deprecated meta no longer exists
*/
-@@ -123,9 +124,11 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
+@@ -123,6 +124,7 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
* Plugins should check that hasLocalizedName() returns true
* before calling this method.
*
@@ -1599,11 +1599,7 @@ index de38d9b667e04852c7bdccfa17cbabb1512f4c19..348ad8932fc55830f83ccc60d5cc4aaf
* @return the localized name that is set
* @deprecated meta no longer exists
*/
-+ @Deprecated // Paper - Deprecate old localized API
- @NotNull
- @Deprecated(forRemoval = true)
- String getLocalizedName();
-@@ -133,6 +136,7 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
+@@ -133,6 +135,7 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
/**
* Sets the localized name.
*
diff --git a/patches/api/0201-Support-components-in-ItemMeta.patch b/patches/api/0201-Support-components-in-ItemMeta.patch
index e3707f1e6..9b5e25bd6 100644
--- a/patches/api/0201-Support-components-in-ItemMeta.patch
+++ b/patches/api/0201-Support-components-in-ItemMeta.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Support components in ItemMeta
diff --git a/src/main/java/org/bukkit/inventory/meta/ItemMeta.java b/src/main/java/org/bukkit/inventory/meta/ItemMeta.java
-index 348ad8932fc55830f83ccc60d5cc4aaf8a29d164..b039fc170c0760f15fa0f9220da2032a23e5c455 100644
+index e1edd463b522a0f610b82917654b7d87ffc3de22..c20d39f0f88e6059803ef44b8460f2de67c5e8a9 100644
--- a/src/main/java/org/bukkit/inventory/meta/ItemMeta.java
+++ b/src/main/java/org/bukkit/inventory/meta/ItemMeta.java
@@ -5,6 +5,7 @@ import java.util.Collection;
@@ -54,7 +54,7 @@ index 348ad8932fc55830f83ccc60d5cc4aaf8a29d164..b039fc170c0760f15fa0f9220da2032a
/**
* Checks for existence of an item name.
*
-@@ -181,6 +206,19 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
+@@ -180,6 +205,19 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
@Nullable
List getLore();
@@ -74,7 +74,7 @@ index 348ad8932fc55830f83ccc60d5cc4aaf8a29d164..b039fc170c0760f15fa0f9220da2032a
/**
* Sets the lore for this item.
* Removes lore when given null.
-@@ -191,6 +229,16 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
+@@ -190,6 +228,16 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
@Deprecated // Paper
void setLore(@Nullable List lore);