aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0611-Add-recipe-to-cook-events.patch
diff options
context:
space:
mode:
authorOwen <[email protected]>2022-03-11 15:13:46 -0500
committerGitHub <[email protected]>2022-03-11 21:13:46 +0100
commitea1efef1164aa7653119eb4be000749930e5b4da (patch)
tree104968ec407cf897e14388b14d2bf397844c8279 /patches/server/0611-Add-recipe-to-cook-events.patch
parent1790528a6104c7c801e02a6f6d2ec0dda70e2af9 (diff)
downloadPaper-ea1efef1164aa7653119eb4be000749930e5b4da.tar.gz
Paper-ea1efef1164aa7653119eb4be000749930e5b4da.zip
Remove Patches (#7541)
Diffstat (limited to 'patches/server/0611-Add-recipe-to-cook-events.patch')
-rw-r--r--patches/server/0611-Add-recipe-to-cook-events.patch44
1 files changed, 0 insertions, 44 deletions
diff --git a/patches/server/0611-Add-recipe-to-cook-events.patch b/patches/server/0611-Add-recipe-to-cook-events.patch
deleted file mode 100644
index 183bc80987..0000000000
--- a/patches/server/0611-Add-recipe-to-cook-events.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Thonk <[email protected]>
-Date: Wed, 6 Jan 2021 12:04:03 -0800
-Subject: [PATCH] Add recipe to cook events
-
-
-diff --git a/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
-index e62fa09ca481183be2ee158b0717172c90de1b92..18eff3a00ae5137ec71c31bc3466a864c60d9fde 100644
---- a/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
-+++ b/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
-@@ -427,7 +427,7 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit
- CraftItemStack source = CraftItemStack.asCraftMirror(itemstack);
- org.bukkit.inventory.ItemStack result = CraftItemStack.asBukkitCopy(itemstack1);
-
-- FurnaceSmeltEvent furnaceSmeltEvent = new FurnaceSmeltEvent(CraftBlock.at(world, blockposition), source, result);
-+ FurnaceSmeltEvent furnaceSmeltEvent = new FurnaceSmeltEvent(CraftBlock.at(world, blockposition), source, result, (org.bukkit.inventory.CookingRecipe<?>) irecipe.toBukkitRecipe()); // Paper
- world.getCraftServer().getPluginManager().callEvent(furnaceSmeltEvent);
-
- if (furnaceSmeltEvent.isCancelled()) {
-diff --git a/src/main/java/net/minecraft/world/level/block/entity/CampfireBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/CampfireBlockEntity.java
-index 02cdd957e7f79f6c00ee015a0d382def8aa2aead..1d2dbaec8201de12fb65e2c01ca8a1ead7e873a7 100644
---- a/src/main/java/net/minecraft/world/level/block/entity/CampfireBlockEntity.java
-+++ b/src/main/java/net/minecraft/world/level/block/entity/CampfireBlockEntity.java
-@@ -52,7 +52,10 @@ public class CampfireBlockEntity extends BlockEntity implements Clearable {
-
- if (campfire.cookingProgress[i] >= campfire.cookingTime[i]) {
- SimpleContainer inventorysubcontainer = new SimpleContainer(new ItemStack[]{itemstack});
-- ItemStack itemstack1 = (ItemStack) world.getRecipeManager().getRecipeFor(RecipeType.CAMPFIRE_COOKING, inventorysubcontainer, world).map((recipecampfire) -> {
-+ // Paper start
-+ Optional<CampfireCookingRecipe> recipe = world.getRecipeManager().getRecipeFor(RecipeType.CAMPFIRE_COOKING, inventorysubcontainer, world);
-+ ItemStack itemstack1 = (ItemStack) recipe.map((recipecampfire) -> {
-+ // Paper end
- return recipecampfire.assemble(inventorysubcontainer);
- }).orElse(itemstack);
-
-@@ -60,7 +63,7 @@ public class CampfireBlockEntity extends BlockEntity implements Clearable {
- CraftItemStack source = CraftItemStack.asCraftMirror(itemstack);
- org.bukkit.inventory.ItemStack result = CraftItemStack.asBukkitCopy(itemstack1);
-
-- BlockCookEvent blockCookEvent = new BlockCookEvent(CraftBlock.at(world, pos), source, result);
-+ BlockCookEvent blockCookEvent = new BlockCookEvent(CraftBlock.at(world, pos), source, result, (org.bukkit.inventory.CookingRecipe<?>) recipe.map(CampfireCookingRecipe::toBukkitRecipe).orElse(null)); // Paper
- world.getCraftServer().getPluginManager().callEvent(blockCookEvent);
-
- if (blockCookEvent.isCancelled()) {