inventory
drop()
Drops a given slot id from the inventory
drop(slot_id: int, stack: boolean): void
Parameters
name | type | description |
---|---|---|
slot_id | int | The slot id to drop |
stack | boolean | Whether to drop the entire stack or a singular item |
shift()
Shifts a slot id in the inventory
shift(slot_id: int): void
Parameters
name | type | description |
---|---|---|
slot_id | int | The slot id to shift |
swap()
Swaps a given slot id with a given hot-bar slot
swap(slot_id: int, hot_bar_slot: int): void
Parameters
name | type | description |
---|---|---|
slot_id | int | The slot id to swap with |
hot_bar_slot | int | The hot-bar slot to swap with |
window_click()
Provides full access to window clicks, used to move around items in inventories
window_click(window_id: int, slot_id: int, mouse_button_clicked: int, mode: int): void
Parameters
name | type | description |
---|---|---|
window_id | int | The window id |
slot_id | int | The slot id |
mouse_button_clicked | int | The mouse button clicked |
mode | int | The clicking mode |
get_item_in_window()
Gets an item out of the given window id
get_item_in_window(window_id: int, slot_id: int): item
Parameters
name | type | description |
---|---|---|
window_id | int | The window id |
slot_id | int | The slot id |
get_item()
Gets an item out of the players inventory
get_item(slot_id: int): item
Parameters
name | type | description |
---|---|---|
slot_id | int | The slot id |
get_damage_reduction()
Gets the damage reduction of the given armor item. Returns 0 if the item is not an armor item
get_damage_reduction(slot_id: int): double
Parameters
name | type | description |
---|---|---|
slot_id | int | The slot id |
get_damage_amount()
Gets the damage amount of the given item
get_damage_amount(slot_id: int): double
Parameters
name | type | description |
---|---|---|
slot_id | int | The slot id |
get_harvest_level()
Gets the harvest level of the given item
get_harvest_level(slot_id: int): double
Parameters
name | type | description |
---|---|---|
slot_id | int | The slot id |
upper_container_id()
Returns the upper chest inventory if a chest gui is currently open
upper_container_id(): int
This method does not have any parameters
lower_container_id()
Returns the lower chest inventory if a chest gui is currently open
lower_container_id(): int
This method does not have any parameters
player_inventory_id()
Returns the player's inventory id
player_inventory_id(): int
This method does not have any parameters
current_inventory()
Returns the current inventory the player is in, returns NIL if player is out of inventory
current_inventory(): string
This method does not have any parameters