You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 4e256f9
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: docs/api-reference.md
+12-4Lines changed: 12 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -66,23 +66,31 @@ isInventoryOpen(): boolean
66
66
67
67
Returns `true` if the inventory is open.
68
68
69
+
### getHotbarSlotCount
70
+
71
+
```
72
+
getHotbarSlotCount(): number
73
+
```
74
+
75
+
Returns the number of hotbar slots. This can change with viewport size and screen orientation (typically 3, 5, or 10). Slot indices from `1` through this value are on the hotbar; higher indices are inventory overflow.
Fires when an item is added to the backpack.`slotIndex` is the slot the item was placed in. Compare with [getHotbarSlotCount](#gethotbarslotcount) to tell hotbar from inventory.
0 commit comments