Merge pull request #355 from opchik98/main
Feature #152 and potential fix #320
This commit is contained in:
@@ -7,7 +7,11 @@ hud.open_inventory()
|
||||
-- Close inventory.
|
||||
hud.close_inventory()
|
||||
|
||||
-- Open block UI and inventory.
|
||||
-- Open UI and inventory.
|
||||
-- Throws an exception if has no UI layout.
|
||||
hud.open(invid: int, layoutid: str)
|
||||
|
||||
-- Open block UI and inventory.
|
||||
-- Throws an exception if block has no UI layout.
|
||||
-- Returns block inventory ID (if *"inventory-size"=0* a virtual
|
||||
-- inventory will be created), and UI layout ID.
|
||||
|
||||
@@ -40,12 +40,18 @@ inventory.bind_block(invid: int, x: int, y: int, z: int)
|
||||
|
||||
-- Unbind inventory from the specified block.
|
||||
inventory.unbind_block(x: int, y: int, z: int)
|
||||
|
||||
-- Remove inventory.
|
||||
inventory.remove(invid: int)
|
||||
```
|
||||
|
||||
> [!WARNING]
|
||||
> Unbound inventories will be deleted on world close.
|
||||
|
||||
```lua
|
||||
-- Create inventory. Returns the created ID.
|
||||
inventory.create(size: int) -> int
|
||||
|
||||
-- Create inventory copy. Returns the created copy ID.
|
||||
inventory.clone(invid: int) -> int
|
||||
|
||||
|
||||
Reference in New Issue
Block a user