Minecraft Data Packs / Server Utility

Commands Menu (1.20.3+)

  • check_circle Advancements
  • check_circle Functions
  • check_circle Loot Tables
  • check_circle Predicates
  • 1,793 views, 17 today
  • 138 downloads, 2 today
  • 12
  • 12
  • 3
GalSergey's Avatar GalSergey
Level 43 : Master Engineer
22
This datapack adds a radial menu around the player to run any commands.

To create a Commands Menu you first need to get the Command Menu item:
loot give @s loot menu:menu
You can also turn any item into a Command Menu item by applying this item modifier to the slot with your item:
item modify entity @s <slot> menu:menu/create
Now place any items in the container (chest / trapped_chest / barrel / shulker_box). These will be the tiles in the radial menu. The central slots will be in front of the player, and the side slots will be behind.
You can use ready-made tiles with commands or create your own, for ready-made tiles use this command:
loot give @s loot menu:tile/<tile>
There are two types of ready-made tiles:
  • static - the usual command/function will be executed for the player who clicked on the tile.
  • dynamic - can run more complex combinations of commands, which can also change the tile on which the player clicked.
But in addition to ready-made command tiles, you can create your own simple static tiles.
Just use a regular item (the item name will be show as the tile name) to create a radial menu.

Now click with the Command Menu item on the container with your tiles. Then all tiles will be automatically loaded into the Command Menu, and the container will be cleared.
You can read all tiles from the Command Menu again for editing by clicking on the empty container.


Ready-made tiles:

Dynamic tiles:


Ender Chest

Displays the contents of the owner's Ender Chest.
You can only take/copy items from Ender Chest.

Right click - copy 1 item from the slot.
Shift + Right click - copy all items from this slot (for example, if there are 17 apples in a slot, then 17 apples will be copied, not 64).
Left click - take 1 item from the slot.
Shift + Left click - take all items from the slot.
loot give @s loot menu:tile/dynamic/ender_chest

Kit

Gives the player all items from the Red Shulker Box.

Any Red Shulker Box is a Kit Tile.
Automatically takes the form of the last item in Shulker Box.
loot give @s loot menu:tile/dynamic/kit

Multi


Allows you to use 4 static command tiles, depending on the method of interaction.
Press Right click with this Multi on a container to write/read all items from/to the container.

Does not support dynamic tiles!

Automatically takes the form of the last item in the Bundle. Thus, if you place 5 items in a Bundle, you can customize the appearance of the tile.
Right click - run first tile command.
Shift + Right click - run second tile command.
Left click - run third tile command.
Shift + Left click - run fourth tile command.
loot give @s loot menu:tile/dynamic/multi

Pin Menu


Allows you to pin the current Command Menu to the current location.
After the pin Command Menu, you can interact with the central pin to customize the display:
Right click - hide Command Menu.
Shift + Right click - ​flat mode.
Left click - ​return Command Menu to player.
Shift + Left click - ​hide pin.
loot give @s loot menu:tile/dynamic/pin_men

Switcher


Executes a command on the current tile and automatically switches to the next tile in the list.
Press Right click with this Switcher on a container to write/read all items from/to the container.

You can also navigate through the list of tiles:

Right click - Execute the command and switch to the next one.
Shift + Right click - Execute the command and switch to the previous one.
Left click - Skip the current tile (without running the command) and switch to the next one.
Shift + Left click - Skip the current tile (without running the command) and switch to the previous one.
loot give @s loot menu:tile/dynamic/switcher

Waypoint


Teleports the player to a saved coordinate.
By default, the Waypoint tile does not contain a teleportation point.
The first Right click will save the current position and create a teleportation point.
Teleportation works between dimensions.
At any time you can rename the Waypoint tile on the anvil to name the location.

Right click - Create waypoint / teleport.
Shift + Right click - Remove this waypoint.

loot give @s loot menu:tile/dynamic/waypoint

Static tiles:

Clear
Clears part of the player's inventory.

loot give @s loot menu:tile/static/clear/all - clear all inventory
loot give @s loot menu:tile/static/clear/armor - clear only armor
loot give @s loot menu:tile/static/clear/hotbar - clear hotbar and offhand
loot give @s loot menu:tile/static/clear/inventory - clear main inventory (without hotbar)

Dimension
Teleports the player to the specified dimension at the same coordinates.
This is not safe teleportation! Use waypoint for this.

loot give @s loot menu:tile/static/dimension/overworld - teleport in Overworld
loot give @s loot menu:tile/static/dimension/the_nether - teleport in The Nether
loot give @s loot menu:tile/static/dimension/the_end - teleport in The End

Effects
Applies some effects to the player

loot give @s loot menu:tile/static/effects/clear - clear all effects
loot give @s loot menu:tile/static/effects/feed - completely restores saturation
loot give @s loot menu:tile/static/effects/full - clears effects, restores saturation and health
loot give @s loot menu:tile/static/effects/heal - restores health
loot give @s loot menu:tile/static/effects/hunger - drains saturation

Gamemode
Switches the player to the specified gamemode.

loot give @s loot menu:tile/static/gamemode/adventure - switch to adventure mode
loot give @s loot menu:tile/static/gamemode/creative - switch to creative mode
loot give @s loot menu:tile/static/gamemode/spectator - switch to spectator mode
loot give @s loot menu:tile/static/gamemode/survival - switch to survival mode

Time
Set in-game daytime.
The day counter does not reset!

loot give @s loot menu:tile/static/time/day - set daytime current day to 1000
loot give @s loot menu:tile/static/time/noon - set daytime current day to 6000
loot give @s loot menu:tile/static/time/night - set daytime current day to 13000
loot give @s loot menu:tile/static/time/midnight - set daytime current day to 18000
loot give @s loot menu:tile/static/time/sync - sets daytime equal to gametime
loot give @s loot menu:tile/static/time/toggle_cycle - switch gamerule doDaylightCycle

Vanish
Sets invisibility for the player.

loot give @s loot menu:tile/static/vanish/on - vanish on
loot give @s loot menu:tile/static/vanish/off - vanish off

Weather
Set weather.

loot give @s loot menu:tile/static/weather/clear - set clear weather
loot give @s loot menu:tile/static/weather/rain - set rain weather
loot give @s loot menu:tile/static/weather/thunder - set thunder weather
loot give @s loot menu:tile/static/weather/toggle_cycle - switch gamerule doWeatherCycle

I took the idea for creating this datapack from this post on Reddit by ​psycrafteu.
CompatibilityMinecraft 1.20
Tags

Create an account or sign in to comment.

1
11/12/2023 7:22 pm
Level 1 : New Miner
Craftgenix
Craftgenix's Avatar
Do you think you could make this work for bedrock?
2
11/14/2023 11:12 am
Level 43 : Master Engineer
GalSergey
GalSergey's Avatar
I dont play Bedrock.
1
12/05/2023 7:52 am
Level 1 : New Miner
weeeeeeeee7864
weeeeeeeee7864's Avatar
appluase
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome