diff options
Diffstat (limited to 'patches/api')
38 files changed, 126 insertions, 215 deletions
diff --git a/patches/api/0001-Convert-project-to-Gradle.patch b/patches/api/0001-Convert-project-to-Gradle.patch index aa54057aba..339ca372f0 100644 --- a/patches/api/0001-Convert-project-to-Gradle.patch +++ b/patches/api/0001-Convert-project-to-Gradle.patch @@ -124,7 +124,7 @@ index 0000000000000000000000000000000000000000..6271e2bad0ed937c2c46a8c8fdf186c4 +} diff --git a/pom.xml b/pom.xml deleted file mode 100644 -index 86628114c1d111f6d256186ca739ba8a44b3412a..0000000000000000000000000000000000000000 +index 2c5ac393cffbe61330c5aa95115e7e906c0775d3..0000000000000000000000000000000000000000 --- a/pom.xml +++ /dev/null @@ -1,267 +0,0 @@ @@ -135,7 +135,7 @@ index 86628114c1d111f6d256186ca739ba8a44b3412a..00000000000000000000000000000000 - - <groupId>org.spigotmc</groupId> - <artifactId>spigot-api</artifactId> -- <version>1.21-R0.1-SNAPSHOT</version> +- <version>1.21.1-R0.1-SNAPSHOT</version> - <packaging>jar</packaging> - - <name>Spigot-API</name> diff --git a/patches/api/0006-Adventure.patch b/patches/api/0006-Adventure.patch index dbb8f58c58..e7fba0f826 100644 --- a/patches/api/0006-Adventure.patch +++ b/patches/api/0006-Adventure.patch @@ -4327,10 +4327,10 @@ index 5adbe0514129abf3cfbc4b29a213f522359fe2e1..72ebc29db42d08d1d0361dba462fc8a5 /** diff --git a/src/main/java/org/bukkit/inventory/InventoryView.java b/src/main/java/org/bukkit/inventory/InventoryView.java -index 5b479ff2abe8cdd5e889803c73a713bc9855bc0b..5954dff2134654bb0ccc3b4c3b51a8e1ca77f6c9 100644 +index 278259e211b926283ee6dfef6f96e11ddbcbf275..ebc14022c9ef9b0b3331ee53e96a32667e4762e0 100644 --- a/src/main/java/org/bukkit/inventory/InventoryView.java +++ b/src/main/java/org/bukkit/inventory/InventoryView.java -@@ -267,12 +267,26 @@ public interface InventoryView { +@@ -269,12 +269,26 @@ public interface InventoryView { */ public boolean setProperty(@NotNull Property prop, int value); diff --git a/patches/api/0012-Add-command-line-option-to-load-extra-plugin-jars-no.patch b/patches/api/0012-Add-command-line-option-to-load-extra-plugin-jars-no.patch index 8dc512dfb3..c73bf65b97 100644 --- a/patches/api/0012-Add-command-line-option-to-load-extra-plugin-jars-no.patch +++ b/patches/api/0012-Add-command-line-option-to-load-extra-plugin-jars-no.patch @@ -7,7 +7,7 @@ Subject: [PATCH] Add command line option to load extra plugin jars not in the ex: java -jar paperclip.jar nogui -add-plugin=/path/to/plugin.jar -add-plugin=/path/to/another/plugin_jar.jar diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java -index 6ecab28705afc0e3652677b516d8a5398e8b2666..db51751d2dc1ac419e8fac32466ad3a7727fa2fe 100644 +index 8d729fb196d83e01e4652fb1f77f5cab7b57cc31..d978c72cdbc10792f852a4ba372518073893d02b 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java @@ -83,6 +83,20 @@ public final class Bukkit { @@ -32,7 +32,7 @@ index 6ecab28705afc0e3652677b516d8a5398e8b2666..db51751d2dc1ac419e8fac32466ad3a7 * Attempts to set the {@link Server} singleton. * <p> diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index f4b2ad91c7a46af5fc16f31369d155e4e3ab3aae..638e98416fdf7ac065abe058d625b1c924be5abb 100644 +index 57c9b560c77a56588870598acb543469040ceec1..8949b8e29ae7f412481291630a5cb7b5b8809842 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java @@ -68,6 +68,18 @@ import org.jetbrains.annotations.Nullable; diff --git a/patches/api/0020-Graduate-bungeecord-chat-API-from-spigot-subclasses.patch b/patches/api/0020-Graduate-bungeecord-chat-API-from-spigot-subclasses.patch index d88bd2a236..f117cfe6c3 100644 --- a/patches/api/0020-Graduate-bungeecord-chat-API-from-spigot-subclasses.patch +++ b/patches/api/0020-Graduate-bungeecord-chat-API-from-spigot-subclasses.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Graduate bungeecord chat API from spigot subclasses Change Javadoc to be accurate diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java -index fe074fe9553f61bdd72b64830532a78415348781..4c5327da1468cb1f9af00a99e7e79f578c47ee2a 100644 +index 26f3ac9c15ff554becfe8ea53a48f67b2de60ed6..bd3fa2bcee24ab7e8f740722f55ed6294fdb294a 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java @@ -472,6 +472,30 @@ public final class Bukkit { @@ -41,7 +41,7 @@ index fe074fe9553f61bdd72b64830532a78415348781..4c5327da1468cb1f9af00a99e7e79f57 * Gets the name of the update folder. The update folder is used to safely * update plugins at the right moment on a plugin load. diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index 9545da2adacaf0bd719c2baef929588cd1042d25..19b75704ed9eee0c929df417e1e5d0ea3718e2f8 100644 +index d78481bf17818415524f14417caf86d5684b2235..067eb3a5f5676f3b1b3f49a65df9c4054c48a1e7 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java @@ -383,6 +383,30 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi diff --git a/patches/api/0053-Fix-upstream-javadocs.patch b/patches/api/0053-Fix-upstream-javadocs.patch index 25d3e035cf..7d51adc5a1 100644 --- a/patches/api/0053-Fix-upstream-javadocs.patch +++ b/patches/api/0053-Fix-upstream-javadocs.patch @@ -416,7 +416,7 @@ index 4e1fb0974d061d5bb64899cac576318d2e6f8bf6..539b3527d0c66611e21712f29b90fba9 public int getEntityId(); diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java -index 274f3ccbc39d4d6ff0665abf334d526317275dd0..a7bfaa874cbd3fc8d24fffe2f7f14594b37fa18c 100644 +index 8fdfa1d79daf464f8e364fd9e19d1de3a2a6848c..195a7fa0ea8e056cbde7b9152cc014d2c94353ff 100644 --- a/src/main/java/org/bukkit/entity/HumanEntity.java +++ b/src/main/java/org/bukkit/entity/HumanEntity.java @@ -22,6 +22,11 @@ import org.jetbrains.annotations.Nullable; @@ -687,7 +687,7 @@ index be0a2d1f234d8265d98e54e518a994957b1f3ab7..4e3c406ba883aae553e8d69b6b719b87 * than BLOCK_CANBUILD, as this refers to a player, not universe-physics * rule like cactus on dirt. diff --git a/src/main/java/org/bukkit/event/enchantment/PrepareItemEnchantEvent.java b/src/main/java/org/bukkit/event/enchantment/PrepareItemEnchantEvent.java -index fc2120e03737f5882d6ae916db93fdcf4939b2ba..f2edd4a9357832e9dec3fb0aafa006335d7b289b 100644 +index 035c647f4d4e3c34f171bb7d7fa6b2b7b3442669..7ae338bcecff2ce25939035181457ced505b3a49 100644 --- a/src/main/java/org/bukkit/event/enchantment/PrepareItemEnchantEvent.java +++ b/src/main/java/org/bukkit/event/enchantment/PrepareItemEnchantEvent.java @@ -81,7 +81,7 @@ public class PrepareItemEnchantEvent extends InventoryEvent implements Cancellab @@ -999,7 +999,7 @@ index 9013d043503d175004ad276799e5935b7fa59dc4..ceae092eb782698803c6c3df41267dde public class InventoryOpenEvent extends InventoryEvent implements Cancellable { private static final HandlerList handlers = new HandlerList(); diff --git a/src/main/java/org/bukkit/event/inventory/PrepareAnvilEvent.java b/src/main/java/org/bukkit/event/inventory/PrepareAnvilEvent.java -index 6782024735a885ba0b1b4dba4a576740c1410366..8977f7609431c3c46324a82de84d4a32f4b71c57 100644 +index 08a7c564fe5d3d232998d1789d4d4723a59c1430..8a5be3f0322ac19aeac3f00df54add0e73bc87ed 100644 --- a/src/main/java/org/bukkit/event/inventory/PrepareAnvilEvent.java +++ b/src/main/java/org/bukkit/event/inventory/PrepareAnvilEvent.java @@ -24,6 +24,20 @@ public class PrepareAnvilEvent extends PrepareInventoryResultEvent { @@ -1022,7 +1022,7 @@ index 6782024735a885ba0b1b4dba4a576740c1410366..8977f7609431c3c46324a82de84d4a32 + @NotNull @Override - public HandlerList getHandlers() { + public AnvilView getView() { diff --git a/src/main/java/org/bukkit/event/player/PlayerResourcePackStatusEvent.java b/src/main/java/org/bukkit/event/player/PlayerResourcePackStatusEvent.java index e4c32b21ab013703a6a1b07a1ad564d914ebe83f..e58fecf0fe54db06e0e944027923a352fd8005d8 100644 --- a/src/main/java/org/bukkit/event/player/PlayerResourcePackStatusEvent.java @@ -1430,7 +1430,7 @@ index f1918027c3a8735b31566856218611656b56db20..476fe14faa39f02444cab8ad95d44010 * @return the currently held item * @see #getItemInMainHand() diff --git a/src/main/java/org/bukkit/inventory/ShapedRecipe.java b/src/main/java/org/bukkit/inventory/ShapedRecipe.java -index a601bc38e322e5810cf883708541e2d199f09ebb..d89068a37de1dcad0b82dee09cc7829109921a05 100644 +index 16c10d75dd28f6bbe843935e8bc91f2bccbd360a..c414ccf03572d48f5c096516fc60a59bb1e8efd7 100644 --- a/src/main/java/org/bukkit/inventory/ShapedRecipe.java +++ b/src/main/java/org/bukkit/inventory/ShapedRecipe.java @@ -24,8 +24,6 @@ public class ShapedRecipe extends CraftingRecipe { @@ -1442,8 +1442,8 @@ index a601bc38e322e5810cf883708541e2d199f09ebb..d89068a37de1dcad0b82dee09cc78291 * @see ShapedRecipe#setIngredient(char, RecipeChoice) * @deprecated Recipes must have keys. Use {@link #ShapedRecipe(NamespacedKey, ItemStack)} * instead. -@@ -44,8 +42,6 @@ public class ShapedRecipe extends CraftingRecipe { - * @param result The item you want the recipe to create. +@@ -45,8 +43,6 @@ public class ShapedRecipe extends CraftingRecipe { + * @exception IllegalArgumentException if the {@code result} is an empty item (AIR) * @see ShapedRecipe#shape(String...) * @see ShapedRecipe#setIngredient(char, Material) - * @see ShapedRecipe#setIngredient(char, Material, int) @@ -1452,12 +1452,12 @@ index a601bc38e322e5810cf883708541e2d199f09ebb..d89068a37de1dcad0b82dee09cc78291 */ public ShapedRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result) { diff --git a/src/main/java/org/bukkit/inventory/ShapelessRecipe.java b/src/main/java/org/bukkit/inventory/ShapelessRecipe.java -index 3d50775da447175b2a94ed9056ef36aa1e69c2eb..03839302c94adc3175d0a88065cd230257ffd20d 100644 +index bc924ae23fa10d87537aebbfd126aa44f199b65c..b7f46a048633945dc71e8efec9a7ebeed5832fd7 100644 --- a/src/main/java/org/bukkit/inventory/ShapelessRecipe.java +++ b/src/main/java/org/bukkit/inventory/ShapelessRecipe.java -@@ -30,11 +30,8 @@ public class ShapelessRecipe extends CraftingRecipe { - * @param key the unique recipe key +@@ -31,11 +31,8 @@ public class ShapelessRecipe extends CraftingRecipe { * @param result The item you want the recipe to create. + * @exception IllegalArgumentException if the {@code result} is an empty item (AIR) * @see ShapelessRecipe#addIngredient(Material) - * @see ShapelessRecipe#addIngredient(MaterialData) - * @see ShapelessRecipe#addIngredient(Material,int) @@ -1467,8 +1467,8 @@ index 3d50775da447175b2a94ed9056ef36aa1e69c2eb..03839302c94adc3175d0a88065cd2302 + * @see ShapelessRecipe#addIngredient(RecipeChoice) */ public ShapelessRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result) { - super(key, result); -@@ -174,7 +171,7 @@ public class ShapelessRecipe extends CraftingRecipe { + super(key, checkResult(result)); +@@ -175,7 +172,7 @@ public class ShapelessRecipe extends CraftingRecipe { /** * Removes multiple instances of an ingredient from the list. If there are diff --git a/patches/api/0059-Shoulder-Entities-Release-API.patch b/patches/api/0059-Shoulder-Entities-Release-API.patch index b7f5537f79..6ac15e28ab 100644 --- a/patches/api/0059-Shoulder-Entities-Release-API.patch +++ b/patches/api/0059-Shoulder-Entities-Release-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Shoulder Entities Release API diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java -index a7bfaa874cbd3fc8d24fffe2f7f14594b37fa18c..8cc6f8547380d567aef7910ef309193bd79ced09 100644 +index 195a7fa0ea8e056cbde7b9152cc014d2c94353ff..85eec2e57b03c11f4737addb0fa88b7bf29dc9e5 100644 --- a/src/main/java/org/bukkit/entity/HumanEntity.java +++ b/src/main/java/org/bukkit/entity/HumanEntity.java -@@ -335,6 +335,26 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder +@@ -337,6 +337,26 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder */ public int getExpToLevel(); diff --git a/patches/api/0067-Allow-plugins-to-use-SLF4J-for-logging.patch b/patches/api/0067-Allow-plugins-to-use-SLF4J-for-logging.patch index 09c7835da1..6b4e030dc0 100644 --- a/patches/api/0067-Allow-plugins-to-use-SLF4J-for-logging.patch +++ b/patches/api/0067-Allow-plugins-to-use-SLF4J-for-logging.patch @@ -45,7 +45,7 @@ index 258d7010d24c529c9bbc76cc26adf226c641ee58..4da053d427f3f9c5e7fc144408836ebe "https://javadoc.io/doc/org.apache.maven.resolver/maven-resolver-api/1.7.3", // Paper ) diff --git a/src/main/java/org/bukkit/plugin/Plugin.java b/src/main/java/org/bukkit/plugin/Plugin.java -index 8c76716249e44ed8bf6be94c1f5c7b6d9bb35be2..4eb639fbb46a0848be207149ea433455550fae1c 100644 +index 68a0ed5f0ed25e98f4ab4d1e482ec2ccfda9cd3a..46fc37a36403c8fbc4c0c9f863d4d57eb3896bd4 100644 --- a/src/main/java/org/bukkit/plugin/Plugin.java +++ b/src/main/java/org/bukkit/plugin/Plugin.java @@ -198,6 +198,22 @@ public interface Plugin extends TabExecutor { diff --git a/patches/api/0068-Handle-plugin-prefixes-in-implementation-logging-con.patch b/patches/api/0068-Handle-plugin-prefixes-in-implementation-logging-con.patch index f80ceb6cb7..74e02036c1 100644 --- a/patches/api/0068-Handle-plugin-prefixes-in-implementation-logging-con.patch +++ b/patches/api/0068-Handle-plugin-prefixes-in-implementation-logging-con.patch @@ -17,7 +17,7 @@ The implementation should handle plugin prefixes by displaying logger names when appropriate. diff --git a/src/main/java/org/bukkit/plugin/java/JavaPlugin.java b/src/main/java/org/bukkit/plugin/java/JavaPlugin.java -index 2a14522c484febcd880d00197df4359a0020dddd..f81e335a4e533221529355bec2f5d588aa79e60c 100644 +index 7f17337b9f0fb60fa1c91c47af496c03290d1b1c..801578de8599d6b546cde63b3f2655fab48eee03 100644 --- a/src/main/java/org/bukkit/plugin/java/JavaPlugin.java +++ b/src/main/java/org/bukkit/plugin/java/JavaPlugin.java @@ -47,7 +47,7 @@ public abstract class JavaPlugin extends PluginBase { diff --git a/patches/api/0070-Add-workaround-for-plugins-modifying-the-parent-of-t.patch b/patches/api/0070-Add-workaround-for-plugins-modifying-the-parent-of-t.patch index 12d008b482..51237ab8d9 100644 --- a/patches/api/0070-Add-workaround-for-plugins-modifying-the-parent-of-t.patch +++ b/patches/api/0070-Add-workaround-for-plugins-modifying-the-parent-of-t.patch @@ -67,7 +67,7 @@ index 0000000000000000000000000000000000000000..087ee57fe5485bc760fadd45a176d4d9 + +} diff --git a/src/main/java/org/bukkit/plugin/java/JavaPlugin.java b/src/main/java/org/bukkit/plugin/java/JavaPlugin.java -index f81e335a4e533221529355bec2f5d588aa79e60c..d359ea9b02952f981b9cf9d778c56eb995454c60 100644 +index 801578de8599d6b546cde63b3f2655fab48eee03..2d64fc065d53dcd8c01d05215c3e63aaf4428177 100644 --- a/src/main/java/org/bukkit/plugin/java/JavaPlugin.java +++ b/src/main/java/org/bukkit/plugin/java/JavaPlugin.java @@ -292,10 +292,10 @@ public abstract class JavaPlugin extends PluginBase { diff --git a/patches/api/0075-Display-warning-on-deprecated-recipe-API.patch b/patches/api/0075-Display-warning-on-deprecated-recipe-API.patch index 94f1cdd1f2..c751b7334b 100644 --- a/patches/api/0075-Display-warning-on-deprecated-recipe-API.patch +++ b/patches/api/0075-Display-warning-on-deprecated-recipe-API.patch @@ -10,25 +10,25 @@ on the players login. Plugin authors need to define a key to keep it consistent between server restarts. diff --git a/src/main/java/org/bukkit/inventory/ShapedRecipe.java b/src/main/java/org/bukkit/inventory/ShapedRecipe.java -index 9f9c67e935940833bbfe58e6bfa398e6c86980d5..71e494177473c62449aafda1699b26a0c4c81a68 100644 +index c414ccf03572d48f5c096516fc60a59bb1e8efd7..e9bac744c5b173e6767e2de8480a6697969fdbb0 100644 --- a/src/main/java/org/bukkit/inventory/ShapedRecipe.java +++ b/src/main/java/org/bukkit/inventory/ShapedRecipe.java @@ -31,6 +31,7 @@ public class ShapedRecipe extends CraftingRecipe { @Deprecated public ShapedRecipe(@NotNull ItemStack result) { - super(NamespacedKey.randomKey(), result); + this(NamespacedKey.randomKey(), result); + new Throwable("Warning: A plugin is creating a recipe using a Deprecated method. This will cause you to receive warnings stating 'Tried to load unrecognized recipe: bukkit:<ID>'. Please ask the author to give their recipe a static key using NamespacedKey.").printStackTrace(); // Paper } /** diff --git a/src/main/java/org/bukkit/inventory/ShapelessRecipe.java b/src/main/java/org/bukkit/inventory/ShapelessRecipe.java -index 03839302c94adc3175d0a88065cd230257ffd20d..d6e38c7ccfe3b6e85eafb611da20b1a29fb74d97 100644 +index b7f46a048633945dc71e8efec9a7ebeed5832fd7..a7513c1aa09b88e3f99e7db40661fd83e682de96 100644 --- a/src/main/java/org/bukkit/inventory/ShapelessRecipe.java +++ b/src/main/java/org/bukkit/inventory/ShapelessRecipe.java @@ -20,6 +20,7 @@ public class ShapelessRecipe extends CraftingRecipe { @Deprecated public ShapelessRecipe(@NotNull ItemStack result) { - super(NamespacedKey.randomKey(), result); + this(NamespacedKey.randomKey(), result); + new Throwable("Warning: A plugin is creating a recipe using a Deprecated method. This will cause you to receive warnings stating 'Tried to load unrecognized recipe: bukkit:<ID>'. Please ask the author to give their recipe a static key using NamespacedKey.").printStackTrace(); // Paper } diff --git a/patches/api/0092-Add-openSign-method-to-HumanEntity.patch b/patches/api/0092-Add-openSign-method-to-HumanEntity.patch index d519918aba..3fdf10fbfc 100644 --- a/patches/api/0092-Add-openSign-method-to-HumanEntity.patch +++ b/patches/api/0092-Add-openSign-method-to-HumanEntity.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add openSign method to HumanEntity diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java -index 8cc6f8547380d567aef7910ef309193bd79ced09..48bb08cc7c0af6ebb905d1e175ada0fd7944ca48 100644 +index 85eec2e57b03c11f4737addb0fa88b7bf29dc9e5..58dbe34ab1b603c2cd53af1625c1f82f8890da01 100644 --- a/src/main/java/org/bukkit/entity/HumanEntity.java +++ b/src/main/java/org/bukkit/entity/HumanEntity.java -@@ -496,6 +496,26 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder +@@ -498,6 +498,26 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder */ @Deprecated public void setShoulderEntityRight(@Nullable Entity entity); diff --git a/patches/api/0114-LivingEntity-Active-Item-API.patch b/patches/api/0114-LivingEntity-Active-Item-API.patch index f98f5d9a7e..0081842496 100644 --- a/patches/api/0114-LivingEntity-Active-Item-API.patch +++ b/patches/api/0114-LivingEntity-Active-Item-API.patch @@ -9,10 +9,10 @@ such as a bow or eating food. Co-authored-by: Jake Potrebic <[email protected]> diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java -index 48bb08cc7c0af6ebb905d1e175ada0fd7944ca48..ee3086661e11d3d8faec30590be7131648d3b82a 100644 +index 58dbe34ab1b603c2cd53af1625c1f82f8890da01..9cbb9093e7d8cd21eef6a23c265d68d7d0ee97b8 100644 --- a/src/main/java/org/bukkit/entity/HumanEntity.java +++ b/src/main/java/org/bukkit/entity/HumanEntity.java -@@ -325,7 +325,9 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder +@@ -327,7 +327,9 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder * blocking). * * @return Whether their hand is raised diff --git a/patches/api/0117-InventoryCloseEvent-Reason-API.patch b/patches/api/0117-InventoryCloseEvent-Reason-API.patch index ed0568548a..1be4583340 100644 --- a/patches/api/0117-InventoryCloseEvent-Reason-API.patch +++ b/patches/api/0117-InventoryCloseEvent-Reason-API.patch @@ -7,10 +7,10 @@ Allows you to determine why an inventory was closed, enabling plugin developers to "confirm" things based on if it was player triggered close or not. diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java -index ee3086661e11d3d8faec30590be7131648d3b82a..25cd03f2f3dc0aaa67173c0f3ebfe56402489e24 100644 +index 9cbb9093e7d8cd21eef6a23c265d68d7d0ee97b8..3985798654a3085c128144e46f7113b7744b8d14 100644 --- a/src/main/java/org/bukkit/entity/HumanEntity.java +++ b/src/main/java/org/bukkit/entity/HumanEntity.java -@@ -185,6 +185,15 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder +@@ -187,6 +187,15 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder */ public void closeInventory(); diff --git a/patches/api/0160-Add-ItemStack-Recipe-API-helper-methods.patch b/patches/api/0160-Add-ItemStack-Recipe-API-helper-methods.patch index 14e94043d2..78e75fc75c 100644 --- a/patches/api/0160-Add-ItemStack-Recipe-API-helper-methods.patch +++ b/patches/api/0160-Add-ItemStack-Recipe-API-helper-methods.patch @@ -22,10 +22,10 @@ index a98fc2ffdae1a2f8f3a312bed95268e105f7f791..91bfeffcdbe47208c7d0ddbe013cd0f1 public static class ExactChoice implements RecipeChoice { diff --git a/src/main/java/org/bukkit/inventory/ShapedRecipe.java b/src/main/java/org/bukkit/inventory/ShapedRecipe.java -index 1ef513d4d03ce677ee9c77b91e2cc5553ab91e0b..1012656948e9bf2aa18867cc2409616f3f21501e 100644 +index e9bac744c5b173e6767e2de8480a6697969fdbb0..fa03cf187db29896f5af046b311f67881aee0ff4 100644 --- a/src/main/java/org/bukkit/inventory/ShapedRecipe.java +++ b/src/main/java/org/bukkit/inventory/ShapedRecipe.java -@@ -179,6 +179,13 @@ public class ShapedRecipe extends CraftingRecipe { +@@ -180,6 +180,13 @@ public class ShapedRecipe extends CraftingRecipe { return this; } @@ -40,10 +40,10 @@ index 1ef513d4d03ce677ee9c77b91e2cc5553ab91e0b..1012656948e9bf2aa18867cc2409616f * Get a copy of the ingredients map. * diff --git a/src/main/java/org/bukkit/inventory/ShapelessRecipe.java b/src/main/java/org/bukkit/inventory/ShapelessRecipe.java -index d6e38c7ccfe3b6e85eafb611da20b1a29fb74d97..b8ac602cd2718d615ec243ce648951a1a46c26ec 100644 +index a7513c1aa09b88e3f99e7db40661fd83e682de96..63a233cc819d8d6995d14b9dbfabc14d89af54cc 100644 --- a/src/main/java/org/bukkit/inventory/ShapelessRecipe.java +++ b/src/main/java/org/bukkit/inventory/ShapelessRecipe.java -@@ -131,6 +131,40 @@ public class ShapelessRecipe extends CraftingRecipe { +@@ -132,6 +132,40 @@ public class ShapelessRecipe extends CraftingRecipe { return this; } @@ -84,7 +84,7 @@ index d6e38c7ccfe3b6e85eafb611da20b1a29fb74d97..b8ac602cd2718d615ec243ce648951a1 /** * Removes an ingredient from the list. * -@@ -154,7 +188,7 @@ public class ShapelessRecipe extends CraftingRecipe { +@@ -155,7 +189,7 @@ public class ShapelessRecipe extends CraftingRecipe { */ @NotNull public ShapelessRecipe removeIngredient(@NotNull Material ingredient) { @@ -93,7 +93,7 @@ index d6e38c7ccfe3b6e85eafb611da20b1a29fb74d97..b8ac602cd2718d615ec243ce648951a1 } /** -@@ -181,7 +215,7 @@ public class ShapelessRecipe extends CraftingRecipe { +@@ -182,7 +216,7 @@ public class ShapelessRecipe extends CraftingRecipe { */ @NotNull public ShapelessRecipe removeIngredient(int count, @NotNull Material ingredient) { diff --git a/patches/api/0166-Fix-Spigot-annotation-mistakes.patch b/patches/api/0166-Fix-Spigot-annotation-mistakes.patch index da580bdf21..22026b5734 100644 --- a/patches/api/0166-Fix-Spigot-annotation-mistakes.patch +++ b/patches/api/0166-Fix-Spigot-annotation-mistakes.patch @@ -453,7 +453,7 @@ index 48aecc9421c500137bbef1dfe3bec8de277c3ff9..aff858346776386f1288b648b221404f return note; } diff --git a/src/main/java/org/bukkit/Registry.java b/src/main/java/org/bukkit/Registry.java -index 3bd96bbd35b657a6030d744e86622e616c2c3b08..5529e227781cd2411de9c6581a1cb1255ce9bb20 100644 +index d1906d150a7d4c4852e085d6fd480aec317c22e4..e9edc8c17cbd29cfdad31df13acb15bab2304735 100644 --- a/src/main/java/org/bukkit/Registry.java +++ b/src/main/java/org/bukkit/Registry.java @@ -220,14 +220,12 @@ public interface Registry<T extends Keyed> extends Iterable<T> { @@ -1068,15 +1068,15 @@ index 53119742beda00a38111063243665bb995ae2188..2d084214e991fecc51f8e18e3d733e43 private static final HandlerList handlers = new HandlerList(); diff --git a/src/main/java/org/bukkit/event/enchantment/PrepareItemEnchantEvent.java b/src/main/java/org/bukkit/event/enchantment/PrepareItemEnchantEvent.java -index f2edd4a9357832e9dec3fb0aafa006335d7b289b..f05ce4fd6c4bbd79edc5f65e7edd1e4a63e93fb8 100644 +index 7ae338bcecff2ce25939035181457ced505b3a49..27564727edbd9f093e3a021ce6f30e1146a8ddbb 100644 --- a/src/main/java/org/bukkit/event/enchantment/PrepareItemEnchantEvent.java +++ b/src/main/java/org/bukkit/event/enchantment/PrepareItemEnchantEvent.java @@ -23,7 +23,7 @@ public class PrepareItemEnchantEvent extends InventoryEvent implements Cancellab private boolean cancelled; private final Player enchanter; -- public PrepareItemEnchantEvent(@NotNull final Player enchanter, @NotNull InventoryView view, @NotNull final Block table, @NotNull final ItemStack item, @NotNull final EnchantmentOffer[] offers, final int bonus) { -+ public PrepareItemEnchantEvent(@NotNull final Player enchanter, @NotNull InventoryView view, @NotNull final Block table, @NotNull final ItemStack item, @org.jetbrains.annotations.Nullable final EnchantmentOffer @NotNull [] offers, final int bonus) { // Paper - offers can contain null values +- public PrepareItemEnchantEvent(@NotNull final Player enchanter, @NotNull EnchantmentView view, @NotNull final Block table, @NotNull final ItemStack item, @NotNull final EnchantmentOffer[] offers, final int bonus) { ++ public PrepareItemEnchantEvent(@NotNull final Player enchanter, @NotNull EnchantmentView view, @NotNull final Block table, @NotNull final ItemStack item, @org.jetbrains.annotations.Nullable final EnchantmentOffer @NotNull [] offers, final int bonus) { // Paper - offers can contain null values super(view); this.enchanter = enchanter; this.table = table; @@ -1497,10 +1497,10 @@ index f1a48eab1a357ae64545e1f1dc941c383cff8707..466d1bd7089b76f48f953e1a51c611ec /** * Checks if the inventory contains any ItemStacks with the given diff --git a/src/main/java/org/bukkit/inventory/InventoryView.java b/src/main/java/org/bukkit/inventory/InventoryView.java -index 5954dff2134654bb0ccc3b4c3b51a8e1ca77f6c9..72f93377b60a3b6a08b8c8264ee7313e89c15da0 100644 +index ebc14022c9ef9b0b3331ee53e96a32667e4762e0..2b2c5faabce1628bd2e82a840dc97fe79bb57856 100644 --- a/src/main/java/org/bukkit/inventory/InventoryView.java +++ b/src/main/java/org/bukkit/inventory/InventoryView.java -@@ -121,9 +121,9 @@ public interface InventoryView { +@@ -123,9 +123,9 @@ public interface InventoryView { * Gets the id of this view. * * @return the id of this view @@ -1512,7 +1512,7 @@ index 5954dff2134654bb0ccc3b4c3b51a8e1ca77f6c9..72f93377b60a3b6a08b8c8264ee7313e public int getId() { return id; } -@@ -193,10 +193,10 @@ public interface InventoryView { +@@ -195,10 +195,10 @@ public interface InventoryView { /** * Get the item on the cursor of one of the viewing players. * @@ -1627,10 +1627,10 @@ index 476fe14faa39f02444cab8ad95d4401033dc6938..2c54660dc1fbc7c1232096797a23cae1 /** diff --git a/src/main/java/org/bukkit/inventory/ShapedRecipe.java b/src/main/java/org/bukkit/inventory/ShapedRecipe.java -index 1012656948e9bf2aa18867cc2409616f3f21501e..aa3b3070126f1c492f004ec7599eeb379b58f207 100644 +index fa03cf187db29896f5af046b311f67881aee0ff4..295d82dd73b600e9436d2bbec0e11dbeaf78bbf4 100644 --- a/src/main/java/org/bukkit/inventory/ShapedRecipe.java +++ b/src/main/java/org/bukkit/inventory/ShapedRecipe.java -@@ -106,8 +106,10 @@ public class ShapedRecipe extends CraftingRecipe { +@@ -107,8 +107,10 @@ public class ShapedRecipe extends CraftingRecipe { * @return The changed recipe, so you can chain calls. * @throws IllegalArgumentException if the {@code key} is a space character * @throws IllegalArgumentException if the {@code key} does not appear in the shape. @@ -1641,7 +1641,7 @@ index 1012656948e9bf2aa18867cc2409616f3f21501e..aa3b3070126f1c492f004ec7599eeb37 public ShapedRecipe setIngredient(char key, @NotNull MaterialData ingredient) { return setIngredient(key, ingredient.getItemType(), ingredient.getData()); } -@@ -190,7 +192,9 @@ public class ShapedRecipe extends CraftingRecipe { +@@ -191,7 +193,9 @@ public class ShapedRecipe extends CraftingRecipe { * Get a copy of the ingredients map. * * @return The mapping of character to ingredients. @@ -1652,10 +1652,10 @@ index 1012656948e9bf2aa18867cc2409616f3f21501e..aa3b3070126f1c492f004ec7599eeb37 public Map<Character, ItemStack> getIngredientMap() { HashMap<Character, ItemStack> result = new HashMap<Character, ItemStack>(); diff --git a/src/main/java/org/bukkit/inventory/ShapelessRecipe.java b/src/main/java/org/bukkit/inventory/ShapelessRecipe.java -index b8ac602cd2718d615ec243ce648951a1a46c26ec..beb798482479c58a8628c314b510ab6349576ce8 100644 +index 63a233cc819d8d6995d14b9dbfabc14d89af54cc..3bf5064cd6ceb05ea98b18993da46c67be140115 100644 --- a/src/main/java/org/bukkit/inventory/ShapelessRecipe.java +++ b/src/main/java/org/bukkit/inventory/ShapelessRecipe.java -@@ -43,8 +43,10 @@ public class ShapelessRecipe extends CraftingRecipe { +@@ -44,8 +44,10 @@ public class ShapelessRecipe extends CraftingRecipe { * * @param ingredient The ingredient to add. * @return The changed recipe, so you can chain calls. @@ -1666,7 +1666,7 @@ index b8ac602cd2718d615ec243ce648951a1a46c26ec..beb798482479c58a8628c314b510ab63 public ShapelessRecipe addIngredient(@NotNull MaterialData ingredient) { return addIngredient(1, ingredient); } -@@ -80,8 +82,10 @@ public class ShapelessRecipe extends CraftingRecipe { +@@ -81,8 +83,10 @@ public class ShapelessRecipe extends CraftingRecipe { * @param count How many to add (can't be more than 9!) * @param ingredient The ingredient to add. * @return The changed recipe, so you can chain calls. @@ -1677,7 +1677,7 @@ index b8ac602cd2718d615ec243ce648951a1a46c26ec..beb798482479c58a8628c314b510ab63 public ShapelessRecipe addIngredient(int count, @NotNull MaterialData ingredient) { return addIngredient(count, ingredient.getItemType(), ingredient.getData()); } -@@ -198,8 +202,10 @@ public class ShapelessRecipe extends CraftingRecipe { +@@ -199,8 +203,10 @@ public class ShapelessRecipe extends CraftingRecipe { * * @param ingredient The ingredient to remove * @return The changed recipe. @@ -1688,7 +1688,7 @@ index b8ac602cd2718d615ec243ce648951a1a46c26ec..beb798482479c58a8628c314b510ab63 public ShapelessRecipe removeIngredient(@NotNull MaterialData ingredient) { return removeIngredient(ingredient.getItemType(), ingredient.getData()); } -@@ -226,8 +232,10 @@ public class ShapelessRecipe extends CraftingRecipe { +@@ -227,8 +233,10 @@ public class ShapelessRecipe extends CraftingRecipe { * @param count The number of copies to remove. * @param ingredient The ingredient to remove. * @return The changed recipe. @@ -1699,7 +1699,7 @@ index b8ac602cd2718d615ec243ce648951a1a46c26ec..beb798482479c58a8628c314b510ab63 public ShapelessRecipe removeIngredient(int count, @NotNull MaterialData ingredient) { return removeIngredient(count, ingredient.getItemType(), ingredient.getData()); } -@@ -277,7 +285,9 @@ public class ShapelessRecipe extends CraftingRecipe { +@@ -278,7 +286,9 @@ public class ShapelessRecipe extends CraftingRecipe { * Get the list of ingredients used for this recipe. * * @return The input list diff --git a/patches/api/0173-Set-true-custom-payload-channel-size-limit.patch b/patches/api/0173-Set-true-custom-payload-channel-size-limit.patch index c524e2aaa0..e64cd78834 100644 --- a/patches/api/0173-Set-true-custom-payload-channel-size-limit.patch +++ b/patches/api/0173-Set-true-custom-payload-channel-size-limit.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Set true custom payload channel size limit This fixes compatibility with some mods that are sending very long channel names. Also gives developers the ability to send longer channel names. diff --git a/src/main/java/org/bukkit/plugin/messaging/Messenger.java b/src/main/java/org/bukkit/plugin/messaging/Messenger.java -index 9d2c68c826f3b867d407e7f13c6394a899cc8ee8..aec70aa740152c34297c42ad6e06c8b54523e78b 100644 +index c748a94523c8bc2140e1842ed7d8d462b52507d5..754fac6b2a45399efa34b06c6aa61f88c19e3d2b 100644 --- a/src/main/java/org/bukkit/plugin/messaging/Messenger.java +++ b/src/main/java/org/bukkit/plugin/messaging/Messenger.java @@ -24,7 +24,7 @@ public interface Messenger { diff --git a/patches/api/0185-Add-item-slot-convenience-methods.patch b/patches/api/0185-Add-item-slot-convenience-methods.patch index 20638212e8..8da43fffbf 100644 --- a/patches/api/0185-Add-item-slot-convenience-methods.patch +++ b/patches/api/0185-Add-item-slot-convenience-methods.patch @@ -6,12 +6,12 @@ Subject: [PATCH] Add item slot convenience methods Co-authored-by: Janet Blackquill <[email protected]> diff --git a/src/main/java/org/bukkit/inventory/AnvilInventory.java b/src/main/java/org/bukkit/inventory/AnvilInventory.java -index 52519cd877017704b53d36088d4d4c28f8f27397..c60be4fd24c7fdf65251dd6169e5e1ac3b588d95 100644 +index 4f484df010dabf03ac4712996a0fd4d8f3649b59..f1f97a85ec713c05c882d7588f4a3e4a017f4795 100644 --- a/src/main/java/org/bukkit/inventory/AnvilInventory.java +++ b/src/main/java/org/bukkit/inventory/AnvilInventory.java -@@ -63,4 +63,64 @@ public interface AnvilInventory extends Inventory { - * @param levels the maximum experience cost +@@ -78,4 +78,64 @@ public interface AnvilInventory extends Inventory { */ + @Deprecated(forRemoval = true, since = "1.21") void setMaximumRepairCost(int levels); + + // Paper start diff --git a/patches/api/0190-Potential-bed-API.patch b/patches/api/0190-Potential-bed-API.patch index 42350ac7bd..1cbb7daffa 100644 --- a/patches/api/0190-Potential-bed-API.patch +++ b/patches/api/0190-Potential-bed-API.patch @@ -8,10 +8,10 @@ Adds a new method to fetch the location of a player's bed without generating any getPotentialBedLocation - Gets the last known location of a player's bed. This does not preform any check if the bed is still valid and does not load any chunks. diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java -index 25cd03f2f3dc0aaa67173c0f3ebfe56402489e24..ccaaf2b6f6424ec7c7d298ceabdc3e60a7917705 100644 +index 3985798654a3085c128144e46f7113b7744b8d14..11c5846848a6631a9376934622caeadd448b0391 100644 --- a/src/main/java/org/bukkit/entity/HumanEntity.java +++ b/src/main/java/org/bukkit/entity/HumanEntity.java -@@ -275,6 +275,19 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder +@@ -277,6 +277,19 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder */ public int getSleepTicks(); diff --git a/patches/api/0196-Add-PrepareResultEvent-PrepareGrindstoneEvent.patch b/patches/api/0196-Add-PrepareResultEvent-PrepareGrindstoneEvent.patch index 95fb3a46ed..10dd96ba7d 100644 --- a/patches/api/0196-Add-PrepareResultEvent-PrepareGrindstoneEvent.patch +++ b/patches/api/0196-Add-PrepareResultEvent-PrepareGrindstoneEvent.patch @@ -93,7 +93,7 @@ index 0000000000000000000000000000000000000000..c305c606bef93866993095cec5f50e19 + } +} diff --git a/src/main/java/org/bukkit/event/inventory/PrepareAnvilEvent.java b/src/main/java/org/bukkit/event/inventory/PrepareAnvilEvent.java -index 8977f7609431c3c46324a82de84d4a32f4b71c57..d884ecf40af964e718168ac055dd6c672d108eb1 100644 +index 8a5be3f0322ac19aeac3f00df54add0e73bc87ed..d2b4b2e9385e7c1e0e1e42886481b99ecc8dcf8e 100644 --- a/src/main/java/org/bukkit/event/inventory/PrepareAnvilEvent.java +++ b/src/main/java/org/bukkit/event/inventory/PrepareAnvilEvent.java @@ -10,9 +10,9 @@ import org.jetbrains.annotations.Nullable; @@ -106,10 +106,10 @@ index 8977f7609431c3c46324a82de84d4a32f4b71c57..d884ecf40af964e718168ac055dd6c67 - private static final HandlerList handlers = new HandlerList(); + // Paper - move HandlerList to PrepareInventoryResultEvent - public PrepareAnvilEvent(@NotNull InventoryView inventory, @Nullable ItemStack result) { + public PrepareAnvilEvent(@NotNull AnvilView inventory, @Nullable ItemStack result) { super(inventory, result); -@@ -38,14 +38,5 @@ public class PrepareAnvilEvent extends PrepareInventoryResultEvent { - super.setResult(result); +@@ -44,14 +44,5 @@ public class PrepareAnvilEvent extends PrepareInventoryResultEvent { + return (AnvilView) super.getView(); } - @NotNull diff --git a/patches/api/0204-Add-additional-open-container-api-to-HumanEntity.patch b/patches/api/0204-Add-additional-open-container-api-to-HumanEntity.patch index c81c83391c..3fe46b8c28 100644 --- a/patches/api/0204-Add-additional-open-container-api-to-HumanEntity.patch +++ b/patches/api/0204-Add-additional-open-container-api-to-HumanEntity.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add additional open container api to HumanEntity diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java -index ccaaf2b6f6424ec7c7d298ceabdc3e60a7917705..b980d55b68ed9da78c5cd19f369bb00dccbf08e1 100644 +index 11c5846848a6631a9376934622caeadd448b0391..f20b0a439c4d5cd2c6caa70a46b1b49f8ab23425 100644 --- a/src/main/java/org/bukkit/entity/HumanEntity.java +++ b/src/main/java/org/bukkit/entity/HumanEntity.java -@@ -180,6 +180,92 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder +@@ -182,6 +182,92 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder @Nullable public InventoryView openMerchant(@NotNull Merchant merchant, boolean force); diff --git a/patches/api/0220-Expose-LivingEntity-hurt-direction.patch b/patches/api/0220-Expose-LivingEntity-hurt-direction.patch index 4d2cb26c38..d8800e48d1 100644 --- a/patches/api/0220-Expose-LivingEntity-hurt-direction.patch +++ b/patches/api/0220-Expose-LivingEntity-hurt-direction.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Expose LivingEntity hurt direction diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java -index b980d55b68ed9da78c5cd19f369bb00dccbf08e1..4d6ceca22d98a3e46aa26ef26176c5417a5ccf35 100644 +index f20b0a439c4d5cd2c6caa70a46b1b49f8ab23425..937c136f2499bd1660989d14c0f50a7ef9a1a2b6 100644 --- a/src/main/java/org/bukkit/entity/HumanEntity.java +++ b/src/main/java/org/bukkit/entity/HumanEntity.java -@@ -354,6 +354,16 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder +@@ -356,6 +356,16 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder */ public void setCooldown(@NotNull Material material, int ticks); diff --git a/patches/api/0236-Add-RegistryAccess-for-managing-registries.patch b/patches/api/0236-Add-RegistryAccess-for-managing-registries.patch index f0864c18fa..43afaf23b3 100644 --- a/patches/api/0236-Add-RegistryAccess-for-managing-registries.patch +++ b/patches/api/0236-Add-RegistryAccess-for-managing-registries.patch @@ -206,7 +206,7 @@ index e0f652117e585882693736de8165ae9c689e1d68..fbe14c327ee9c1ac07893853ca7c699e return server.getRegistry(tClass); } diff --git a/src/main/java/org/bukkit/Registry.java b/src/main/java/org/bukkit/Registry.java -index 5529e227781cd2411de9c6581a1cb1255ce9bb20..f99e68f160deba42e2833fa0f81df4c17bf68ec7 100644 +index e9edc8c17cbd29cfdad31df13acb15bab2304735..987cde111d27638eb89105d2615a4da503de174b 100644 --- a/src/main/java/org/bukkit/Registry.java +++ b/src/main/java/org/bukkit/Registry.java @@ -102,7 +102,7 @@ public interface Registry<T extends Keyed> extends Iterable<T> { diff --git a/patches/api/0256-add-isDeeplySleeping-to-HumanEntity.patch b/patches/api/0256-add-isDeeplySleeping-to-HumanEntity.patch index e561fa1dba..14754cc21c 100644 --- a/patches/api/0256-add-isDeeplySleeping-to-HumanEntity.patch +++ b/patches/api/0256-add-isDeeplySleeping-to-HumanEntity.patch @@ -5,10 +5,10 @@ Subject: [PATCH] add isDeeplySleeping to HumanEntity diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java -index 4d6ceca22d98a3e46aa26ef26176c5417a5ccf35..58c842a1fd946d94ae29c7d2439aaf77e47f69b4 100644 +index 937c136f2499bd1660989d14c0f50a7ef9a1a2b6..b1b18886fc63a4854c2858ff9869da70e92dae26 100644 --- a/src/main/java/org/bukkit/entity/HumanEntity.java +++ b/src/main/java/org/bukkit/entity/HumanEntity.java -@@ -364,6 +364,15 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder +@@ -366,6 +366,15 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder void setHurtDirection(float hurtDirection); // Paper end diff --git a/patches/api/0277-Improve-item-default-attribute-API.patch b/patches/api/0277-Improve-item-default-attribute-API.patch index e7c6fb4cd2..c50dedd13c 100644 --- a/patches/api/0277-Improve-item-default-attribute-API.patch +++ b/patches/api/0277-Improve-item-default-attribute-API.patch @@ -72,7 +72,7 @@ index cc25734f3dcf6075eb44e39da01ed2f1b59b618e..8b04e0d81c56712057f1fee288b3609e * * @param slot the {@link EquipmentSlot} to check diff --git a/src/main/java/org/bukkit/inventory/ItemType.java b/src/main/java/org/bukkit/inventory/ItemType.java -index 5dd1c084e42ee93f3a358f58ed76b0a7d36f0713..94587a97fcea81a43b160b01d2c81cef2b7f4413 100644 +index 2b5a18fe7e885fa9b581c0afb299e31f3db2690c..a6d1dde422de98f178c0c9add99e01203a35e5cb 100644 --- a/src/main/java/org/bukkit/inventory/ItemType.java +++ b/src/main/java/org/bukkit/inventory/ItemType.java @@ -2261,6 +2261,21 @@ public interface ItemType extends Keyed, Translatable, net.kyori.adventure.trans diff --git a/patches/api/0329-More-PotionEffectType-API.patch b/patches/api/0329-More-PotionEffectType-API.patch index d80151aec0..dead62249f 100644 --- a/patches/api/0329-More-PotionEffectType-API.patch +++ b/patches/api/0329-More-PotionEffectType-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] More PotionEffectType API diff --git a/src/main/java/org/bukkit/Registry.java b/src/main/java/org/bukkit/Registry.java -index a583d26883c8b7012203e128cd64113df94307c1..4d3e0b90579b33ff93fc565e8ee99a01b690c62b 100644 +index 987cde111d27638eb89105d2615a4da503de174b..4cfaf177052f40cc409f0a90272af147825e4b1f 100644 --- a/src/main/java/org/bukkit/Registry.java +++ b/src/main/java/org/bukkit/Registry.java @@ -321,6 +321,33 @@ public interface Registry<T extends Keyed> extends Iterable<T> { diff --git a/patches/api/0352-Add-Player-getFishHook.patch b/patches/api/0352-Add-Player-getFishHook.patch index 61c4560da5..0e0d38d513 100644 --- a/patches/api/0352-Add-Player-getFishHook.patch +++ b/patches/api/0352-Add-Player-getFishHook.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add Player#getFishHook diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java -index 58c842a1fd946d94ae29c7d2439aaf77e47f69b4..294de2c073167e7186fbf1d6885fe5951351cc9c 100644 +index b1b18886fc63a4854c2858ff9869da70e92dae26..773651350c17cae9058346a590eda758071b7447 100644 --- a/src/main/java/org/bukkit/entity/HumanEntity.java +++ b/src/main/java/org/bukkit/entity/HumanEntity.java -@@ -392,6 +392,13 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder +@@ -394,6 +394,13 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder @Nullable public Location getPotentialBedLocation(); // Paper end diff --git a/patches/api/0392-Add-Shearable-API.patch b/patches/api/0392-Add-Shearable-API.patch index 06e4cefb44..dcd0ffe7bd 100644 --- a/patches/api/0392-Add-Shearable-API.patch +++ b/patches/api/0392-Add-Shearable-API.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Add Shearable API diff --git a/src/main/java/io/papermc/paper/entity/Shearable.java b/src/main/java/io/papermc/paper/entity/Shearable.java new file mode 100644 -index 0000000000000000000000000000000000000000..0d5793790ab6a47525ad33033517361205756338 +index 0000000000000000000000000000000000000000..b547922db418ff813ddb6a3b37dced0db393e1f5 --- /dev/null +++ b/src/main/java/io/papermc/paper/entity/Shearable.java -@@ -0,0 +1,43 @@ +@@ -0,0 +1,53 @@ +package io.papermc.paper.entity; + +import net.kyori.adventure.sound.Sound; @@ -52,17 +52,27 @@ index 0000000000000000000000000000000000000000..0d5793790ab6a47525ad330335173612 + * @return if the entity can be sheared + */ + boolean readyToBeSheared(); ++ ++ /** ++ * @return Whether the sheep is sheared. ++ */ ++ public boolean isSheared(); ++ ++ /** ++ * @param flag Whether to shear the sheep ++ */ ++ public void setSheared(boolean flag); +} diff --git a/src/main/java/org/bukkit/entity/Bogged.java b/src/main/java/org/bukkit/entity/Bogged.java -index a89f104aa2b2244c075a72c698a9b616c57eaf7c..a36bb84c17120bc578ab01d45f6f12fb1faf9548 100644 +index 8b75a505a55a96a5795ac31a2d37307add12cd9e..6296a6f3f3e794677fd3a626376f357c740ec356 100644 --- a/src/main/java/org/bukkit/entity/Bogged.java +++ b/src/main/java/org/bukkit/entity/Bogged.java @@ -6,5 +6,5 @@ import org.jetbrains.annotations.ApiStatus; * Represents a Bogged Skeleton. */ @ApiStatus.Experimental --public interface Bogged extends AbstractSkeleton { -+public interface Bogged extends AbstractSkeleton, io.papermc.paper.entity.Shearable { // Paper - Shear API +-public interface Bogged extends AbstractSkeleton, Shearable { ++public interface Bogged extends AbstractSkeleton, Shearable, io.papermc.paper.entity.Shearable { // Paper - Shear API } diff --git a/src/main/java/org/bukkit/entity/MushroomCow.java b/src/main/java/org/bukkit/entity/MushroomCow.java index cef1700834643fe28ed5737578d91ecefbe99e2f..86c0043ef4e1288b6fe2f68a9b6d01c3de2c3454 100644 @@ -78,18 +88,16 @@ index cef1700834643fe28ed5737578d91ecefbe99e2f..86c0043ef4e1288b6fe2f68a9b6d01c3 /** * Checks for the presence of custom potion effects to be applied to the diff --git a/src/main/java/org/bukkit/entity/Sheep.java b/src/main/java/org/bukkit/entity/Sheep.java -index f4ce312ccd927a8b64f4266b35a0a53b85e591f3..97388d46cee225dedc0b61a12e7b60b3424732c8 100644 +index 46bc1a0ed9ee320c68a38362c1fa1f31319f01d8..01a0e5b1bb18d7a28d68329c2e2ab78a8df45f8e 100644 --- a/src/main/java/org/bukkit/entity/Sheep.java +++ b/src/main/java/org/bukkit/entity/Sheep.java -@@ -5,7 +5,7 @@ import org.bukkit.material.Colorable; +@@ -5,5 +5,5 @@ import org.bukkit.material.Colorable; /** * Represents a Sheep. */ --public interface Sheep extends Animals, Colorable { -+public interface Sheep extends Animals, Colorable, io.papermc.paper.entity.Shearable { // Paper - Shear API - - /** - * @return Whether the sheep is sheared. +-public interface Sheep extends Animals, Colorable, Shearable { ++public interface Sheep extends Animals, Colorable, Shearable, io.papermc.paper.entity.Shearable { // Paper - Shear API + } diff --git a/src/main/java/org/bukkit/entity/Snowman.java b/src/main/java/org/bukkit/entity/Snowman.java index 10f8f6d45ae9280651c3ebddd1f90acbd7d6ff29..7fbfdb07585c7b28acea1f0c1f58ada0cc744441 100644 --- a/src/main/java/org/bukkit/entity/Snowman.java diff --git a/patches/api/0426-Attribute-Modifier-API-improvements.patch b/patches/api/0426-Attribute-Modifier-API-improvements.patch index dc2fb7fbe6..acf67fcd39 100644 --- a/patches/api/0426-Attribute-Modifier-API-improvements.patch +++ b/patches/api/0426-Attribute-Modifier-API-improvements.patch @@ -70,7 +70,7 @@ index f08ee26cc4d479e1bfc5264b8cbe721315de91f2..f1fa86ddf1f50a357c9e94cc61261d8c * Remove a modifier from this instance. * diff --git a/src/main/java/org/bukkit/attribute/AttributeModifier.java b/src/main/java/org/bukkit/attribute/AttributeModifier.java -index c6b8700d258b859d246118868167497397010292..3808f76d49e24c20156c013f68e00efa9351f1a3 100644 +index ee39c0b83e558681e8b006172d34c98e2c83cda2..c57690798108e9f91f8c552f39dcc2b080fe1b61 100644 --- a/src/main/java/org/bukkit/attribute/AttributeModifier.java +++ b/src/main/java/org/bukkit/attribute/AttributeModifier.java @@ -25,26 +25,32 @@ public class AttributeModifier implements ConfigurationSerializable, Keyed { diff --git a/patches/api/0430-Experimental-annotations-change.patch b/patches/api/0430-Experimental-annotations-change.patch index 59788de534..9ea8f3a126 100644 --- a/patches/api/0430-Experimental-annotations-change.patch +++ b/patches/api/0430-Experimental-annotations-change.patch @@ -104,7 +104,7 @@ index 60fbacee263e55f91ac977f020e390d46024723a..ecff691c3a0878659fb051926ef769ce /** diff --git a/src/main/java/org/bukkit/entity/Bogged.java b/src/main/java/org/bukkit/entity/Bogged.java -index a36bb84c17120bc578ab01d45f6f12fb1faf9548..719bccf8638f8ad358d37fa7eeccbc4c08d32868 100644 +index 6296a6f3f3e794677fd3a626376f357c740ec356..7d993f8bd18ec1d3260d12f0ff8078a86ee4867d 100644 --- a/src/main/java/org/bukkit/entity/Bogged.java +++ b/src/main/java/org/bukkit/entity/Bogged.java @@ -5,6 +5,5 @@ import org.jetbrains.annotations.ApiStatus; @@ -112,7 +112,7 @@ index a36bb84c17120bc578ab01d45f6f12fb1faf9548..719bccf8638f8ad358d37fa7eeccbc4c * Represents a Bogged Skeleton. */ - public interface Bogged extends AbstractSkeleton, io.papermc.paper.entity.Shearable { // Paper - Shear API + public interface Bogged extends AbstractSkeleton, Shearable, io.papermc.paper.entity.Shearable { // Paper - Shear API } diff --git a/src/main/java/org/bukkit/entity/Breeze.java b/src/main/java/org/bukkit/entity/Breeze.java index a75e725805c193a408683885cba83ca168347165..254bc6e18961a72f471334cc0535e3c7a9d70012 100644 diff --git a/patches/api/0432-Improve-Registry.patch b/patches/api/0432-Improve-Registry.patch index 4c5275651a..25dc918f6f 100644 --- a/patches/api/0432-Improve-Registry.patch +++ b/patches/api/0432-Improve-Registry.patch @@ -31,7 +31,7 @@ index 62d2b3f950860dee0898d77b0a29635c3f9a7e23..704dba92f9246ef398ed8d162ebee3cf @Override public @NotNull String translationKey() { diff --git a/src/main/java/org/bukkit/Registry.java b/src/main/java/org/bukkit/Registry.java -index 4d3e0b90579b33ff93fc565e8ee99a01b690c62b..36a8f6082f111a1cbb25e0ff3c968a89f02611a0 100644 +index 4cfaf177052f40cc409f0a90272af147825e4b1f..7296bd71a5e3d4f977701d6fa1cdd3def63fcd54 100644 --- a/src/main/java/org/bukkit/Registry.java +++ b/src/main/java/org/bukkit/Registry.java @@ -357,6 +357,79 @@ public interface Registry<T extends Keyed> extends Iterable<T> { @@ -128,12 +128,12 @@ index 4d3e0b90579b33ff93fc565e8ee99a01b690c62b..36a8f6082f111a1cbb25e0ff3c968a89 } } diff --git a/src/main/java/org/bukkit/block/banner/PatternType.java b/src/main/java/org/bukkit/block/banner/PatternType.java -index 6a6be0287255cf38a735bfc83ec91644dc96b903..1883183157c875d87656fdc86a589e9b95dc4895 100644 +index 9e90572745909538e942b7fbe788b5286c6cc9a3..100f93358e0a1fa8507775a2afd29314ff353a87 100644 --- a/src/main/java/org/bukkit/block/banner/PatternType.java +++ b/src/main/java/org/bukkit/block/banner/PatternType.java -@@ -69,6 +69,13 @@ public enum PatternType implements Keyed { - this.key = NamespacedKey.minecraft(key); - } +@@ -56,6 +56,13 @@ public interface PatternType extends OldEnum<PatternType>, Keyed { + PatternType FLOW = getType("flow"); + PatternType GUSTER = getType("guster"); + // Paper start - deprecate getKey + /** @@ -144,7 +144,7 @@ index 6a6be0287255cf38a735bfc83ec91644dc96b903..1883183157c875d87656fdc86a589e9b + // Paper end - deprecate getKey @Override @NotNull - public NamespacedKey getKey() { + public NamespacedKey getKey(); diff --git a/src/main/java/org/bukkit/generator/structure/Structure.java b/src/main/java/org/bukkit/generator/structure/Structure.java index 1a766e68713d4014783b3224b9395644116784fa..978054ee364f9a3330525b9b50da5325ebb6ef57 100644 --- a/src/main/java/org/bukkit/generator/structure/Structure.java diff --git a/patches/api/0443-Add-Lifecycle-Event-system.patch b/patches/api/0443-Add-Lifecycle-Event-system.patch index 1cf5d6a813..65cbf1e41c 100644 --- a/patches/api/0443-Add-Lifecycle-Event-system.patch +++ b/patches/api/0443-Add-Lifecycle-Event-system.patch @@ -8,7 +8,7 @@ meant for managing resources across reloads and from points in the PluginBootstrap. diff --git a/src/main/java/io/papermc/paper/plugin/bootstrap/BootstrapContext.java b/src/main/java/io/papermc/paper/plugin/bootstrap/BootstrapContext.java -index 08f2050356acaf74e3210416760e3873c2dafd2c..37dfdcfcbd14947e0550e7528aca68f452e53eb6 100644 +index 70d5f9802f90605a5120ff2a000a2e9395f0aecc..c319f3bbfabdd39ee571c59d7bfc144c58232abc 100644 --- a/src/main/java/io/papermc/paper/plugin/bootstrap/BootstrapContext.java +++ b/src/main/java/io/papermc/paper/plugin/bootstrap/BootstrapContext.java @@ -1,6 +1,9 @@ diff --git a/patches/api/0469-Fix-issues-with-recipe-API.patch b/patches/api/0469-Fix-issues-with-recipe-API.patch index 2635c201c9..1718a050de 100644 --- a/patches/api/0469-Fix-issues-with-recipe-API.patch +++ b/patches/api/0469-Fix-issues-with-recipe-API.patch @@ -40,18 +40,18 @@ index f7fa79393aef40027446b78bac8e9490cfafd8bc..07906ca1a9b39fcc6774870daa498402 } diff --git a/src/main/java/org/bukkit/inventory/CraftingRecipe.java b/src/main/java/org/bukkit/inventory/CraftingRecipe.java -index e4bf772f7e06f38215bee68f089b15a4fcb12817..37024b4736dd3897490ca51d08cf07901b01d59f 100644 +index 1b7b07715067014bf3d35002ae1655793248b426..9575e40c7ef3e1d86d10d83b33d9e68f0ed7406f 100644 --- a/src/main/java/org/bukkit/inventory/CraftingRecipe.java +++ b/src/main/java/org/bukkit/inventory/CraftingRecipe.java -@@ -18,7 +18,7 @@ public abstract class CraftingRecipe implements Recipe, Keyed { - - protected CraftingRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result) { - Preconditions.checkArgument(key != null, "key cannot be null"); +@@ -99,7 +99,7 @@ public abstract class CraftingRecipe implements Recipe, Keyed { + @ApiStatus.Internal + @NotNull + protected static ItemStack checkResult(@NotNull ItemStack result) { - Preconditions.checkArgument(result.getType() != Material.AIR, "Recipe must have non-AIR result."); -+ Preconditions.checkArgument(!result.isEmpty(), "Recipe cannot have an empty result."); // Paper - this.key = key; - this.output = new ItemStack(result); ++ Preconditions.checkArgument(result.isEmpty(), "Recipe cannot have an empty result"); // Paper + return result; } + } diff --git a/src/main/java/org/bukkit/inventory/EmptyRecipeChoice.java b/src/main/java/org/bukkit/inventory/EmptyRecipeChoice.java new file mode 100644 index 0000000000000000000000000000000000000000..ed0ab6163f47ec843ba4f7ea4a98bb2fa315eaa1 @@ -211,10 +211,10 @@ index 91bfeffcdbe47208c7d0ddbe013cd0f11fddfa32..e7796054f3f65f5bea7f93c75320195f } } diff --git a/src/main/java/org/bukkit/inventory/ShapedRecipe.java b/src/main/java/org/bukkit/inventory/ShapedRecipe.java -index aa3b3070126f1c492f004ec7599eeb379b58f207..1815de38654dd134abde3dd9bd0b018b91247bd5 100644 +index 295d82dd73b600e9436d2bbec0e11dbeaf78bbf4..c0105d716985acef497d60b5c631a56b4ca5847b 100644 --- a/src/main/java/org/bukkit/inventory/ShapedRecipe.java +++ b/src/main/java/org/bukkit/inventory/ShapedRecipe.java -@@ -177,14 +177,15 @@ public class ShapedRecipe extends CraftingRecipe { +@@ -178,14 +178,15 @@ public class ShapedRecipe extends CraftingRecipe { Preconditions.checkArgument(key != ' ', "Space in recipe shape must represent no ingredient"); Preconditions.checkArgument(ingredients.containsKey(key), "Symbol does not appear in the shape:", key); @@ -233,10 +233,10 @@ index aa3b3070126f1c492f004ec7599eeb379b58f207..1815de38654dd134abde3dd9bd0b018b // Paper end diff --git a/src/main/java/org/bukkit/inventory/ShapelessRecipe.java b/src/main/java/org/bukkit/inventory/ShapelessRecipe.java -index beb798482479c58a8628c314b510ab6349576ce8..8251170314ab25c26270208e453b4e3909435754 100644 +index 3bf5064cd6ceb05ea98b18993da46c67be140115..79db6dbc0367de2eaa397674624c765d5aeb8fa5 100644 --- a/src/main/java/org/bukkit/inventory/ShapelessRecipe.java +++ b/src/main/java/org/bukkit/inventory/ShapelessRecipe.java -@@ -131,7 +131,7 @@ public class ShapelessRecipe extends CraftingRecipe { +@@ -132,7 +132,7 @@ public class ShapelessRecipe extends CraftingRecipe { public ShapelessRecipe addIngredient(@NotNull RecipeChoice ingredient) { Preconditions.checkArgument(ingredients.size() + 1 <= 9, "Shapeless recipes cannot have more than 9 ingredients"); @@ -245,7 +245,7 @@ index beb798482479c58a8628c314b510ab6349576ce8..8251170314ab25c26270208e453b4e39 return this; } -@@ -144,6 +144,8 @@ public class ShapelessRecipe extends CraftingRecipe { +@@ -145,6 +145,8 @@ public class ShapelessRecipe extends CraftingRecipe { @NotNull public ShapelessRecipe addIngredient(int count, @NotNull ItemStack item) { Preconditions.checkArgument(ingredients.size() + count <= 9, "Shapeless recipes cannot have more than 9 ingredients"); diff --git a/patches/api/0470-Fix-equipment-slot-and-group-API.patch b/patches/api/0470-Fix-equipment-slot-and-group-API.patch index 0601373657..d8e0a08ce1 100644 --- a/patches/api/0470-Fix-equipment-slot-and-group-API.patch +++ b/patches/api/0470-Fix-equipment-slot-and-group-API.patch @@ -10,7 +10,7 @@ Adds the following: Co-authored-by: SoSeDiK <[email protected]> diff --git a/src/main/java/org/bukkit/attribute/AttributeModifier.java b/src/main/java/org/bukkit/attribute/AttributeModifier.java -index 3808f76d49e24c20156c013f68e00efa9351f1a3..e14b64d3b178791dacc7849e97f2ed95f1919c55 100644 +index c57690798108e9f91f8c552f39dcc2b080fe1b61..bfa378fe3d074bafbc0af2c4d858e2a34d3126bd 100644 --- a/src/main/java/org/bukkit/attribute/AttributeModifier.java +++ b/src/main/java/org/bukkit/attribute/AttributeModifier.java @@ -118,6 +118,7 @@ public class AttributeModifier implements ConfigurationSerializable, Keyed { diff --git a/patches/api/0475-Registry-Modification-API.patch b/patches/api/0475-Registry-Modification-API.patch index b364107ae4..5c2b4b90a8 100644 --- a/patches/api/0475-Registry-Modification-API.patch +++ b/patches/api/0475-Registry-Modification-API.patch @@ -790,7 +790,7 @@ index 0000000000000000000000000000000000000000..11d19e339c7c62f2eb4467277552c27e +record TagKeyImpl<T>(RegistryKey<T> registryKey, Key key) implements TagKey<T> { +} diff --git a/src/main/java/org/bukkit/Registry.java b/src/main/java/org/bukkit/Registry.java -index fcc9664fd1fe081c9c70bcd7e511c60d987b44f9..8e306d05e372855929d30456ed2d27a04d55ac42 100644 +index 7296bd71a5e3d4f977701d6fa1cdd3def63fcd54..a9fc57327d40779f1657567b265529ab5c8ed9c3 100644 --- a/src/main/java/org/bukkit/Registry.java +++ b/src/main/java/org/bukkit/Registry.java @@ -356,6 +356,27 @@ public interface Registry<T extends Keyed> extends Iterable<T> { diff --git a/patches/api/0476-Introduce-registry-entry-and-builders.patch b/patches/api/0476-Introduce-registry-entry-and-builders.patch index e97c9cef4e..02fe71f495 100644 --- a/patches/api/0476-Introduce-registry-entry-and-builders.patch +++ b/patches/api/0476-Introduce-registry-entry-and-builders.patch @@ -480,7 +480,7 @@ index 6c9689baca1763e2ef79495d38618d587e792434..4583092c2d1ffe95be2831c5d5f0e904 + // Paper end } diff --git a/src/main/java/org/bukkit/inventory/ItemType.java b/src/main/java/org/bukkit/inventory/ItemType.java -index 94587a97fcea81a43b160b01d2c81cef2b7f4413..6bc1853ada3ea38bc36cb31fbb5ce246347fe5d4 100644 +index a6d1dde422de98f178c0c9add99e01203a35e5cb..885a37af013b7934768fb4a742b0a69e0b6f034c 100644 --- a/src/main/java/org/bukkit/inventory/ItemType.java +++ b/src/main/java/org/bukkit/inventory/ItemType.java @@ -46,7 +46,7 @@ import org.jetbrains.annotations.Nullable; diff --git a/patches/api/0481-Move-CraftComplexRecipe-to-extend-CraftingRecipe.patch b/patches/api/0481-Move-CraftComplexRecipe-to-extend-CraftingRecipe.patch index 7bf99722cc..02a7c4f9ff 100644 --- a/patches/api/0481-Move-CraftComplexRecipe-to-extend-CraftingRecipe.patch +++ b/patches/api/0481-Move-CraftComplexRecipe-to-extend-CraftingRecipe.patch @@ -8,10 +8,10 @@ CraftingRecipe. As such, this complex recipe should also be a crafting recipe. diff --git a/src/main/java/org/bukkit/inventory/CraftingRecipe.java b/src/main/java/org/bukkit/inventory/CraftingRecipe.java -index 37024b4736dd3897490ca51d08cf07901b01d59f..afa3de9ab78d01c448d450d8afbc7b1e7e62754c 100644 +index 9575e40c7ef3e1d86d10d83b33d9e68f0ed7406f..e8c3afda92d4ae5430d622ea18500985d6cc00f2 100644 --- a/src/main/java/org/bukkit/inventory/CraftingRecipe.java +++ b/src/main/java/org/bukkit/inventory/CraftingRecipe.java -@@ -11,8 +11,11 @@ import org.jetbrains.annotations.NotNull; +@@ -12,8 +12,11 @@ import org.jetbrains.annotations.NotNull; * Represents a shaped or shapeless crafting recipe. */ public abstract class CraftingRecipe implements Recipe, Keyed { diff --git a/patches/api/0482-Add-CrafterCraftEvent.patch b/patches/api/0482-Add-CrafterCraftEvent.patch deleted file mode 100644 index c91ab8393d..0000000000 --- a/patches/api/0482-Add-CrafterCraftEvent.patch +++ /dev/null @@ -1,97 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: ploppyperson <[email protected]> -Date: Thu, 18 Jul 2024 16:37:58 +0200 -Subject: [PATCH] Add CrafterCraftEvent - -Ports the currently proposed CrafterCraftEvent -from upstream. -The type is experimental to account for spigot -potentially changing some api contracts, however -the event is required for a stable release and -waiting on spigot's PR queue is not an option. - -See: https://hub.spigotmc.org/stash/projects/SPIGOT/repos/bukkit/pull-requests/1044/overview - -diff --git a/src/main/java/org/bukkit/event/block/CrafterCraftEvent.java b/src/main/java/org/bukkit/event/block/CrafterCraftEvent.java -new file mode 100644 -index 0000000000000000000000000000000000000000..8dec6d16aa3c3579eadd77f637c9afa54ee9a90f ---- /dev/null -+++ b/src/main/java/org/bukkit/event/block/CrafterCraftEvent.java -@@ -0,0 +1,77 @@ -+package org.bukkit.event.block; -+ -+import org.bukkit.block.Block; -+import org.bukkit.event.Cancellable; -+import org.bukkit.event.HandlerList; -+import org.bukkit.inventory.CraftingRecipe; -+import org.bukkit.inventory.ItemStack; -+import org.jetbrains.annotations.NotNull; -+ -+/** -+ * Event called when a Crafter is about to craft an item -+ * @apiNote Currently still experimental as it is ported from an open, not merged, spigot PR. -+ * The event was pulled to allow protection plugins and the likes to properly manage crafters. -+ * The type remains experimental as upstream *may* change the event before pulling it, resulting in a breaking change. -+ */ -+public class CrafterCraftEvent extends BlockEvent implements Cancellable { -+ -+ private static final HandlerList handlers = new HandlerList(); -+ private boolean cancelled; -+ private ItemStack result; -+ private final CraftingRecipe recipe; -+ -+ @org.jetbrains.annotations.ApiStatus.Internal // Paper - internal constructor. -+ public CrafterCraftEvent(@NotNull Block theBlock, @NotNull CraftingRecipe recipe, @NotNull ItemStack result) { -+ super(theBlock); -+ this.result = result; -+ this.recipe = recipe; -+ } -+ -+ /** -+ * Gets the result for the craft -+ * @return the result for the craft -+ */ -+ @NotNull -+ public ItemStack getResult() { -+ return result.clone(); -+ } -+ -+ /** -+ * Sets the result of the craft -+ * @param result the result of the craft -+ */ -+ public void setResult(@NotNull ItemStack result) { -+ this.result = result.clone(); -+ } -+ -+ /** -+ * The recipe that was used to craft this item -+ * @return the recipe that was used to craft this item -+ */ -+ @NotNull -+ public CraftingRecipe getRecipe() { -+ return recipe; -+ } -+ -+ @NotNull -+ @Override -+ public HandlerList getHandlers() { -+ return handlers; -+ } -+ -+ @Override -+ public boolean isCancelled() { -+ return cancelled; -+ } -+ -+ @Override -+ public void setCancelled(boolean cancel) { -+ this.cancelled = cancel; -+ } -+ -+ @NotNull -+ public static HandlerList getHandlerList() { -+ return handlers; -+ } -+} diff --git a/patches/api/0483-Fix-PickupStatus-getting-reset.patch b/patches/api/0482-Fix-PickupStatus-getting-reset.patch index 6473947708..6473947708 100644 --- a/patches/api/0483-Fix-PickupStatus-getting-reset.patch +++ b/patches/api/0482-Fix-PickupStatus-getting-reset.patch |