This commit is contained in:
gnembon committed 2020-03-29 02:17:13 -03:00
1 parent 419b739d5e
commit 43ff0e8c11
7 files changed
+39 -41

No files matched your search

@@ -263,11 +263,11 @@ public class NBTSerializableValue extends Value implements ContainerValueInterfa
public static int validateSlot(int slot, Inventory inv)
{
int invSize = inv.getInvSize();
int invSize = inv.size();
if (slot < 0)
slot = invSize + slot;
if (slot < 0 || slot >= invSize)
return inv.getInvSize(); // outside of inventory
return inv.size(); // outside of inventory
return slot;
}