mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-23 19:15:32 +01:00
22 lines
488 B
Diff
22 lines
488 B
Diff
--- a/net/minecraft/server/Slot.java
|
|
+++ b/net/minecraft/server/Slot.java
|
|
@@ -2,7 +2,7 @@
|
|
|
|
public class Slot {
|
|
|
|
- private final int index;
|
|
+ public final int index; // CraftBukkit - public
|
|
public final IInventory inventory;
|
|
public int rawSlotIndex;
|
|
public int f;
|
|
@@ -45,6 +45,9 @@
|
|
}
|
|
|
|
public boolean hasItem() {
|
|
+ if (getItem() != null && getItem().count == 0) {
|
|
+ set(null);
|
|
+ }
|
|
return this.getItem() != null;
|
|
}
|
|
|