- check_circle Functions
Published Sep 15th, 2022, 9/15/22 12:25 am
- 1,995 views, 1 today
- 223 downloads, 0 today
2
One thing that has annoyed me is that using /datapack list came up with a ugly menu and didn't really tell you much, so I came up with this datapack, it shows your installed datapacks in a much easier to read format while also crediting the datapack creator, as seen in the image above
How To Use:
This datapack really only is useful if a lot of people use it, so I will ask you all to share this datapack wherever you can. I will be making all my datapacks compatible with this from now on and I suggest you do as well.
How To Use:
As a consumer:
It's very simple, just do /trigger Datapack_Menu as seen in the image.
As a creator:
It's a bit complicated but I think I made it as simple as possible, if you're here you
probably know about directories so I won't bother explaining that to you.
Here's the folder structure you will need:
- Your Datapack
- data
- your_namespace
- functions
- menuitem.mcfunction
- minecraft
- tags
- functions
- menuinfo.json
menuinfo.json HAS to have
{"replace":false,"values":[";dpmenu:menuitem";]}
in it.
While menuitem.mcfunction can really have anything in it I do think consistency would be good, so use
tellraw @s ["",{"text":"[your datapack]","color":"gold","clickEvent":{"action":"open_url","value":"your download page/"},"hoverEvent":{"action":"show_text","contents":[{"text":"Version: 1.0","color":"blue"}]}},{"text":" [your name]","color":"light_purple","clickEvent":{"action":"open_url","value":"your site"}},{"text": " [UNINSTALL]","color": "dark_purple","clickEvent": {"action": "run_command","value": "uninstall function"}}]
and customize it however you want.
One more thing i should mention is how menuitem.mcfunction can be named anything, just make sure menuinfo.json has the correct function inside of it.
Add collapsed content hereThis datapack really only is useful if a lot of people use it, so I will ask you all to share this datapack wherever you can. I will be making all my datapacks compatible with this from now on and I suggest you do as well.
Compatibility | Minecraft 1.13 |
to | Minecraft 1.19 |
Tags |
5648879
119
Create an account or sign in to comment.
execute as @a[scores={Datapack_Menu=1}] if score @s Datapack_Menu matches 1 run function dpmenu:showmenu
You check for the same score twice (in the selector and with if score; dpmenu:tick), that is unnecessary
Anyways, great idea! :D
Edit: I noticed the same issue has already been mentioned in another comment.
I would also add a requirement where the datapacks should use periods to line up with their “Author” and “Uninstall” buttons. A clean, aligned GUI would be very good in getting more people to your pack. That is also why when you create a settings menu, you should generally put the options to the left of the label to ensure that the labels align. Just a piece of advice.
In your tick function you wrote
execute as @a[scores={Datapack_Menu=1}] if score @s Datapack_Menu matches 1 run function dpmenu:showmenu
but the selector and the if score argument do exactly the same thing.