From d0fe692fd3e0c5fd79ffea9cf5ef067f8ca580f3 Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Sun, 4 Jan 2015 22:06:29 +0000 Subject: [PATCH] SPIGOT-178: Treat ItemStacks of 0 size as empty By: Thinkofdeath --- paper-server/nms-patches/Slot.patch | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 paper-server/nms-patches/Slot.patch diff --git a/paper-server/nms-patches/Slot.patch b/paper-server/nms-patches/Slot.patch new file mode 100644 index 0000000000..dd05f9c03a --- /dev/null +++ b/paper-server/nms-patches/Slot.patch @@ -0,0 +1,12 @@ +--- ../work/decompile-8eb82bde//net/minecraft/server/Slot.java 2015-01-04 21:48:34.213601099 +0000 ++++ src/main/java/net/minecraft/server/Slot.java 2015-01-04 21:48:34.213601099 +0000 +@@ -45,6 +45,9 @@ + } + + public boolean hasItem() { ++ if (getItem() != null && getItem().count == 0) { ++ set(null); ++ } + return this.getItem() != null; + } +