summaryrefslogtreecommitdiffstats
path: root/nms-patches/Slot.patch
blob: a9b73d5c6900dae32ceee61acdf7bc263a713e21 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
--- a/net/minecraft/server/Slot.java
+++ b/net/minecraft/server/Slot.java
@@ -45,6 +45,9 @@
     }
 
     public boolean hasItem() {
+        if (getItem() != null && getItem().count == 0) {
+            set(null);
+        }
         return this.getItem() != null;
     }