aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0145-ensureServerConversions-API.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/server/0145-ensureServerConversions-API.patch')
-rw-r--r--patches/server/0145-ensureServerConversions-API.patch25
1 files changed, 25 insertions, 0 deletions
diff --git a/patches/server/0145-ensureServerConversions-API.patch b/patches/server/0145-ensureServerConversions-API.patch
new file mode 100644
index 0000000000..85e770b115
--- /dev/null
+++ b/patches/server/0145-ensureServerConversions-API.patch
@@ -0,0 +1,25 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Aikar <[email protected]>
+Date: Wed, 4 May 2016 22:43:12 -0400
+Subject: [PATCH] ensureServerConversions API
+
+This will take a Bukkit ItemStack and run it through any conversions a server process would perform on it,
+to ensure it meets latest minecraft expectations.
+
+diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
+index 319ad3342740657175ad78a1c1cc383046fe2fb5..3868c1fbfed3a6bc1cea760834a96a1df66b184c 100644
+--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
++++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
+@@ -518,4 +518,12 @@ public final class CraftItemFactory implements ItemFactory {
+ return io.papermc.paper.adventure.PaperAdventure.asAdventure(CraftItemStack.asNMSCopy(itemStack).getDisplayName());
+ }
+ // Paper end - Adventure
++
++ // Paper start - ensure server conversions API
++ // TODO: DO WE NEED THIS?
++ @Override
++ public ItemStack ensureServerConversions(ItemStack item) {
++ return CraftItemStack.asCraftMirror(CraftItemStack.asNMSCopy(item));
++ }
++ // Paper end - ensure server conversions API
+ }