Since Minecraft 1.20 adds a lot of new commands to the game, I as a map maker thought about another new command that would allow the community to build much greater maps and mini games. Here is the syntax I came up with:
/interface
Can be used to open and close any interface that the game provides.
/interface open @s block ~ ~ ~ true
Opens the interface of the block at this position. The boolean at the end makes the interface not care about the distance between the player and the block. If true is provided, distance is not taken into account. False is the default value.
/interface open @s entity @e[limit=1,type=minecraft:chest_minecart]
Opens the interface of the entity selected by the entity selector "@e[limit=1,type=minecraft:chest_minecart]". Since no boolean is provided at the end of the command. The distance between the entity and the player is checked like normal, closing the interface if to big.
/interface open @s interface inventory
Opens the players inventory. Other interfaces can be opened by using other key words like options menu. For example:
/interface open @s interface menu.options.resource_packs to open the resource pack selection screen.
/interface close @s
Closes the currently open interface. Works similar to pressing the Esc key on the keyboard.
Please sign in to leave a comment.
4 Comments