mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-30 14:33:56 +01:00
SPIGOT-178: Treat ItemStacks of 0 size as empty
This commit is contained in:
parent
c051558691
commit
c13376df5d
12
nms-patches/Slot.patch
Normal file
12
nms-patches/Slot.patch
Normal file
@ -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;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user