A GUI command that creates an NBT-storage-like container that does not live in the world. Creating a GUI would be similar to creating other command-based resources:
/gui <add> <id> <rows> <columns> <display_name>
It could be modified via data or any item command that can modify a block (such as /item):
/data modify gui <id> Items[{Slot:4b}] set from entity @s SelectedItem
/item replace gui container.4 from entity @s weapon.mainhand
It should be possible to force the GUI open or closed on target player, as well as be able to check if its open:
/execute as @a unless gui <id> run gui <show | hide> <id>
If may even be feasible to add a type to the GUI on creation, such as "crafting_table", "container", "smithing_table" etc.
The command could also be called /container instead of /gui.
Please sign in to leave a comment.
0 Comments