mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-22 18:45:54 +01:00
71c84c8132
Upstream has released updates that appear 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: 9a80d38c SPIGOT-336, SPIGOT-3366, SPIGOT-5768, SPIGOT-6409, SPIGOT-6861, PR-722: Add EntityRemoveEvent 258086d9 SPIGOT-7417, PR-967: Add Sign#getTargetSide and Sign#getAllowedEditor ffaba051 SPIGOT-7584: Add missing Tag.ITEMS_NON_FLAMMABLE_WOOD CraftBukkit Changes: 98b6c1ac7 SPIGOT-7589 Fix NullPointerException when bans expire a2736ddb0 SPIGOT-336, SPIGOT-3366, SPIGOT-5768, SPIGOT-6409, SPIGOT-6861, PR-1008: Add EntityRemoveEvent 5bf12cb89 SPIGOT-7565: Throw a more descriptive error message when a developer tries to spawn an entity from a CraftBukkit class 76d95fe7e SPIGOT-7417, PR-1343: Add Sign#getTargetSide and Sign#getAllowedEditor Spigot Changes: e9ec5485 Rebuild patches f1b62e0c Rebuild patches
70 lines
2.9 KiB
Diff
70 lines
2.9 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Thonk <30448663+ExcessiveAmountsOfZombies@users.noreply.github.com>
|
|
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 f8f9b08a0bd82a2667ae4e0c99dae9103f0db3f0..25478725bef34153bca204c815a167913b9cd389 100644
|
|
--- a/src/main/java/org/bukkit/event/inventory/FurnaceSmeltEvent.java
|
|
+++ b/src/main/java/org/bukkit/event/inventory/FurnaceSmeltEvent.java
|
|
@@ -12,7 +12,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
|
|
}
|