From f3727ff7575d8cb402e3fb90792e8998d73056b0 Mon Sep 17 00:00:00 2001 From: MiniDigger | Martin Date: Sun, 18 Apr 2021 11:02:48 +0200 Subject: [PATCH] Updated Upstream (Bukkit/CraftBukkit) (#5508) 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: 14883d6b SPIGOT-6078: Add SmithItemEvent and expand SmithingInventory API CraftBukkit Changes: 115244c7 SPIGOT-6078: Add SmithItemEvent and expand SmithingInventory API --- .../Add-item-slot-convenience-methods.patch | 35 +++---------------- .../Add-PrepareResultEvent.patch | 2 +- .../InventoryCloseEvent-Reason-API.patch | 2 +- Spigot-Server-Patches/Timings-v2.patch | 4 +-- work/Bukkit | 2 +- work/CraftBukkit | 2 +- 6 files changed, 11 insertions(+), 36 deletions(-) diff --git a/Spigot-API-Patches/Add-item-slot-convenience-methods.patch b/Spigot-API-Patches/Add-item-slot-convenience-methods.patch index cd7c308be..a4c0dbd1e 100644 --- a/Spigot-API-Patches/Add-item-slot-convenience-methods.patch +++ b/Spigot-API-Patches/Add-item-slot-convenience-methods.patch @@ -181,16 +181,10 @@ diff --git a/src/main/java/org/bukkit/inventory/SmithingInventory.java b/src/mai index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/bukkit/inventory/SmithingInventory.java +++ b/src/main/java/org/bukkit/inventory/SmithingInventory.java -@@ -0,0 +0,0 @@ - package org.bukkit.inventory; - -+import org.jetbrains.annotations.Nullable; // Paper -+ - /** - * Interface to the inventory of a Smithing table. - */ --public interface SmithingInventory extends Inventory { } -+public interface SmithingInventory extends Inventory { +@@ -0,0 +0,0 @@ public interface SmithingInventory extends Inventory { + */ + @Nullable + Recipe getRecipe(); + + // Paper start + /** @@ -230,27 +224,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + default void setInputMineral(@Nullable ItemStack itemStack) { + setItem(1, itemStack); + } -+ -+ /** -+ * Gets the result item. -+ * -+ * @return result -+ */ -+ @Nullable -+ default ItemStack getResult() { -+ return getItem(2); -+ } -+ -+ /** -+ * Sets the result item. -+ * -+ * @param itemStack item to set -+ */ -+ default void setResult(@Nullable ItemStack itemStack) { -+ setItem(2, itemStack); -+ } + // Paper end -+} + } diff --git a/src/main/java/org/bukkit/inventory/StonecutterInventory.java b/src/main/java/org/bukkit/inventory/StonecutterInventory.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/bukkit/inventory/StonecutterInventory.java diff --git a/Spigot-Server-Patches/Add-PrepareResultEvent.patch b/Spigot-Server-Patches/Add-PrepareResultEvent.patch index ab9b98ed6..209aa2e05 100644 --- a/Spigot-Server-Patches/Add-PrepareResultEvent.patch +++ b/Spigot-Server-Patches/Add-PrepareResultEvent.patch @@ -86,7 +86,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/net/minecraft/world/inventory/ContainerSmithing.java +++ b/src/main/java/net/minecraft/world/inventory/ContainerSmithing.java @@ -0,0 +0,0 @@ public class ContainerSmithing extends ContainerAnvilAbstract { - org.bukkit.craftbukkit.event.CraftEventFactory.callPrepareSmithingEvent(getBukkitView(), itemstack); // CraftBukkit + // CraftBukkit end } + org.bukkit.craftbukkit.event.CraftEventFactory.callPrepareResultEvent(this, 2); // Paper diff --git a/Spigot-Server-Patches/InventoryCloseEvent-Reason-API.patch b/Spigot-Server-Patches/InventoryCloseEvent-Reason-API.patch index 24cc5dd57..12ea07bb8 100644 --- a/Spigot-Server-Patches/InventoryCloseEvent-Reason-API.patch +++ b/Spigot-Server-Patches/InventoryCloseEvent-Reason-API.patch @@ -93,7 +93,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 +import org.bukkit.event.inventory.InventoryCloseEvent; // Paper import org.bukkit.event.inventory.InventoryCreativeEvent; import org.bukkit.event.inventory.InventoryType.SlotType; - import org.bukkit.event.player.AsyncPlayerChatEvent; + import org.bukkit.event.inventory.SmithItemEvent; @@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn { @Override diff --git a/Spigot-Server-Patches/Timings-v2.patch b/Spigot-Server-Patches/Timings-v2.patch index bcf514351..506ebab01 100644 --- a/Spigot-Server-Patches/Timings-v2.patch +++ b/Spigot-Server-Patches/Timings-v2.patch @@ -1379,9 +1379,9 @@ diff --git a/src/main/java/net/minecraft/server/network/PlayerConnection.java b/ index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/server/network/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/network/PlayerConnection.java -@@ -0,0 +0,0 @@ import org.bukkit.inventory.CraftingInventory; - import org.bukkit.inventory.EquipmentSlot; +@@ -0,0 +0,0 @@ import org.bukkit.inventory.EquipmentSlot; import org.bukkit.inventory.InventoryView; + import org.bukkit.inventory.SmithingInventory; import org.bukkit.util.NumberConversions; +import co.aikar.timings.MinecraftTimings; // Paper // CraftBukkit end diff --git a/work/Bukkit b/work/Bukkit index 9477fa26f..14883d6b1 160000 --- a/work/Bukkit +++ b/work/Bukkit @@ -1 +1 @@ -Subproject commit 9477fa26f2d29dba3250b1486cd2b353d697b011 +Subproject commit 14883d6b17f7cbf695a154266fa23372a4381ebe diff --git a/work/CraftBukkit b/work/CraftBukkit index 28d72c4bd..115244c74 160000 --- a/work/CraftBukkit +++ b/work/CraftBukkit @@ -1 +1 @@ -Subproject commit 28d72c4bd8c22f568384560459d0d703c2d0fefe +Subproject commit 115244c744b1ef289d97d4e6cc777e60f185ff64