- check_circle Functions
- 11,498 views, 9 today
- 651 downloads, 0 today
Required Resource Pack
59
✧✦ GUI Maker+v1.0 ✦✧: Creating GUI menus has never been easier in vanilla Minecraft with this datapack. Once mastered, this tool allows you to work wonders!
❃ Features ❃
⇨ Retrieves items from the inventory placed in the menu.
⇨ Add up to 100 pages.
⇨ Clickable items.
⇨ An example menu is included in the datapack! Execute the command /function gui:example
⚙ Tutorial ⚙
❂ Choose which item will open your menu ❂
✧ First, select the item that will open your desired menu. To trigger the menu, you need an item with the tag {gui:1b} and the tag main (optional, default 0). The main tag indicates the starting page of the menu.
❂ Setting up a menu ❂
✧ Place a chest and add the items you desire. For each clickable item, give it a unique tag.
✧ Stand on top of the chest and add it to the menu as the main page using the following command:
/data modify storage gui:page pageId set from block coordinate Items
❂ Click event inside the menu ❂
⇨ To go to a specific page when you click, add the tag target:id with the desired page ID.
⚪ Make an item non-clickable by adding the tag: {null:1b}.
Make sure that every single item has the tag {ui:1b} ...
⇨ Now, open the datapack folder and follow the instructions.
❖ GUI Maker is a datapack that enables you to effortlessly create GUI menus. ❖
❃ Features ❃
⇨ Retrieves items from the inventory placed in the menu.
⇨ Add up to 100 pages.
⇨ Clickable items.
⇨ An example menu is included in the datapack! Execute the command /function gui:example
⚙ Tutorial ⚙
❂ Choose which item will open your menu ❂
✧ First, select the item that will open your desired menu. To trigger the menu, you need an item with the tag {gui:1b} and the tag main (optional, default 0). The main tag indicates the starting page of the menu.
❈ Example command:
/give @s nether_star{gui:1b,main:0b}
❂ Setting up a menu ❂
✧ Place a chest and add the items you desire. For each clickable item, give it a unique tag.
❈ Example item:
/give @p diamond{diamond:1b,ui:1b}
✧ Stand on top of the chest and add it to the menu as the main page using the following command:
/data modify storage gui:page pageId set from block coordinate Items
✦ Example Command:
/data modify storage gui:page 0 set from block ~ ~ ~ Items
❂ Click event inside the menu ❂
⇨ To go to a specific page when you click, add the tag target:id with the desired page ID.
Click to reveal
/give @p arrow{ui:1b,target:1b}
⚪ Make an item non-clickable by adding the tag: {null:1b}.
Make sure that every single item has the tag {ui:1b} ...
⇨ Now, open the datapack folder and follow the instructions.
Instructions :
📁 Open the datapack folder and go to "gui-lib/data/custom_gui/functions/click".
📝 Copy the first 2 lines of code in this file.
✏️ Replace the values in bold and italic. The function to execute is on the second line. Note that the function can contain any command you want to execute at the player's position when they interact with the menu. Example:
Suppose you have an item with the tag {grass:1b} representing a grass block. When the player clicks on this item in the GUI, the following command will be executed:
🔍 Command:
```
```
This command checks if the player successfully clicked on the grass block with the specified tags.
Next, using the "if" statement, it checks if the player's score #grass gui.click matches 1 (which indicates a successful click). If true, it runs the following command:
🔍 Command:
```
```
This command makes the menu say "You clicked on the grass block!" in the chat as a response to their successful interaction with the GUI.
Remember to customize the commands and tags based on your specific requirements and desired interactions in the GUI. Have fun creating your GUI menu! 🌟
📝 Copy the first 2 lines of code in this file.
✏️ Replace the values in bold and italic. The function to execute is on the second line. Note that the function can contain any command you want to execute at the player's position when they interact with the menu. Example:
Suppose you have an item with the tag {grass:1b} representing a grass block. When the player clicks on this item in the GUI, the following command will be executed:
🔍 Command:
```
execute store success score #grass gui.click run clear @p grass_block{grass:1b} 1
```
This command checks if the player successfully clicked on the grass block with the specified tags.
Next, using the "if" statement, it checks if the player's score #grass gui.click matches 1 (which indicates a successful click). If true, it runs the following command:
🔍 Command:
```
execute if score #grass gui.click matches 1 run say You clicked on the grass block!
### This function is executed at @p as the menu ###
```
This command makes the menu say "You clicked on the grass block!" in the chat as a response to their successful interaction with the GUI.
Remember to customize the commands and tags based on your specific requirements and desired interactions in the GUI. Have fun creating your GUI menu! 🌟
Credit | This datapack uses the Entity Linker tool from @Cloud Wolf and uses JMC |
Compatibility | Minecraft 1.16 |
to | Minecraft 1.20 |
Tags |
3 Update Logs
Update #3 : by Prodige Gasy 07/20/2023 11:09:11 amJul 20th, 2023
Modifications :
- Menu setup section reorganized for better clarity and understanding.
- Large menu optimization for improved performance and stability.
- New system of page finding (+more…)
- New system of storage
- Minecarts (menu) uses a vector system to teleport.
- Item disappearing
- Null item not working properly
- Lag peak when changing pages
LOAD MORE LOGS
tools/tracking
5651329
119
gui-maker
Create an account or sign in to comment.