diff options
author | Kyle Wood <[email protected]> | 2021-04-24 17:01:33 -0500 |
---|---|---|
committer | Kyle Wood <[email protected]> | 2021-04-25 18:37:43 -0500 |
commit | 3093b81fee3064603c368ab934eddf66ce304433 (patch) | |
tree | cb99f05b5f31de92c41af4cc40b4bef5f3cbf573 /Spigot-API-Patches-Unmapped/0279-Add-recipe-to-cook-events.patch | |
parent | 1af696a05d21cbdd7b5a7170f95598c013257588 (diff) | |
download | Paper-3093b81fee3064603c368ab934eddf66ce304433.tar.gz Paper-3093b81fee3064603c368ab934eddf66ce304433.zip |
Move patches
Diffstat (limited to 'Spigot-API-Patches-Unmapped/0279-Add-recipe-to-cook-events.patch')
-rw-r--r-- | Spigot-API-Patches-Unmapped/0279-Add-recipe-to-cook-events.patch | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/Spigot-API-Patches-Unmapped/0279-Add-recipe-to-cook-events.patch b/Spigot-API-Patches-Unmapped/0279-Add-recipe-to-cook-events.patch new file mode 100644 index 0000000000..b0b34773c0 --- /dev/null +++ b/Spigot-API-Patches-Unmapped/0279-Add-recipe-to-cook-events.patch @@ -0,0 +1,69 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Thonk <[email protected]> +Date: Wed, 6 Jan 2021 12:05:29 -0800 +Subject: [PATCH] Add recipe to cook events + + +diff --git a/src/main/java/org/bukkit/event/block/BlockCookEvent.java b/src/main/java/org/bukkit/event/block/BlockCookEvent.java +index be7af5440bf9923f0c9c84efa4d70a89337a2f96..a3f1c9cb36c9069ed622985a525bfc2a7a27ab91 100644 +--- a/src/main/java/org/bukkit/event/block/BlockCookEvent.java ++++ b/src/main/java/org/bukkit/event/block/BlockCookEvent.java +@@ -14,12 +14,21 @@ public class BlockCookEvent extends BlockEvent implements Cancellable { + private final ItemStack source; + private ItemStack result; + private boolean cancelled; ++ private final org.bukkit.inventory.CookingRecipe<?> recipe; // Paper + ++ @Deprecated // Paper + public BlockCookEvent(@NotNull final Block block, @NotNull final ItemStack source, @NotNull final ItemStack result) { ++ // Paper start ++ this(block, source, result, null); ++ } ++ ++ public BlockCookEvent(@NotNull final Block block, @NotNull final ItemStack source, @NotNull final ItemStack result, @org.jetbrains.annotations.Nullable org.bukkit.inventory.CookingRecipe<?> recipe) { ++ // Paper end + super(block); + this.source = source; + this.result = result; + this.cancelled = false; ++ this.recipe = recipe; // Paper + } + + /** +@@ -61,6 +70,18 @@ public class BlockCookEvent extends BlockEvent implements Cancellable { + this.cancelled = cancel; + } + ++ // Paper start ++ /** ++ * Gets the cooking recipe associated with this event. ++ * ++ * @return the recipe ++ */ ++ @org.jetbrains.annotations.Nullable ++ public org.bukkit.inventory.CookingRecipe<?> getRecipe() { ++ return recipe; ++ } ++ // Paper end ++ + @NotNull + @Override + public HandlerList getHandlers() { +diff --git a/src/main/java/org/bukkit/event/inventory/FurnaceSmeltEvent.java b/src/main/java/org/bukkit/event/inventory/FurnaceSmeltEvent.java +index 066e7dd9a34d35c8b643a5efcf95d6a5ef47c7ee..16b3ab8f525c4e863f804cc8460a330407d85478 100644 +--- a/src/main/java/org/bukkit/event/inventory/FurnaceSmeltEvent.java ++++ b/src/main/java/org/bukkit/event/inventory/FurnaceSmeltEvent.java +@@ -10,7 +10,13 @@ import org.jetbrains.annotations.NotNull; + */ + public class FurnaceSmeltEvent extends BlockCookEvent { + ++ @Deprecated // Paper + public FurnaceSmeltEvent(@NotNull final Block furnace, @NotNull final ItemStack source, @NotNull final ItemStack result) { + super(furnace, source, result); + } ++ // Paper start ++ public FurnaceSmeltEvent(@NotNull final Block furnace, @NotNull final ItemStack source, @NotNull final ItemStack result, @org.jetbrains.annotations.Nullable org.bukkit.inventory.CookingRecipe<?> recipe) { ++ super(furnace, source, result, recipe); ++ } ++ // Paper end + } |