命令菜单

命令菜单

在玩家周围添加一个环形菜单以运行任何命令。

该数据包在玩家周围添加了一个径向菜单,用于运行任意命令。

要创建命令菜单,你首先需要获得命令菜单物品:

loot give @s loot menu:menu

你也可以通过将此物品修饰器应用到物品所在槽位,将任意物品转换为命令菜单物品:

item modify entity @s <slot> menu:menu/create

现在将任意物品放入容器(箱子 / 陷阱箱 / 木桶 / 潜影盒)中。这些物品将成为径向菜单中的格子。中央槽位位于玩家前方,侧边槽位位于玩家后方。 你可以使用带命令的现成格子,也可以创建自己的格子。使用现成格子,请使用此命令:

loot give @s loot menu:tile/<tile>

现成格子有两种类型:

  • 静态 - 点击格子的玩家将执行常规命令/函数。
  • 动态 - 可以运行更复杂的命令组合,还可以改变玩家所点击的格子。

但除了现成的命令格子外,你还可以创建自己的简单静态格子。 只需使用普通物品(物品名称将显示为格子名称)即可创建径向菜单。

现在用命令菜单物品点击装有格子的容器。然后所有格子将自动加载到命令菜单中,容器将被清空。 你可以通过点击空容器,再次从命令菜单中读取所有格子以进行编辑。

现成格子:

动态格子:

末影箱查看器

显示所有者末影箱的内容。
你只能从末影箱中取出/复制物品。
右键单击 - 从槽位复制 1 个物品。
Shift + 右键单击 - 复制该槽位中的所有物品(例如,如果槽位中有 17 个苹果,则将复制 17 个苹果,而不是 64 个)。
左键单击 - 从槽位取出 1 个物品。
Shift + 左键单击 - 从槽位取出所有物品。

loot give @s loot menu:tile/dynamic/ender_chest
套件

给予玩家红色潜影盒中的所有物品。
任何红色潜影盒都是套件格子。
自动采用潜影盒中最后一个物品的外观。

loot give @s loot menu:tile/dynamic/kit
多重

允许你根据交互方式使用 4 个静态命令格子。
用此多重格子右键单击容器,以向容器写入/从容器读取所有物品。

不支持动态格子!

自动采用收纳袋中最后一个物品的外观。因此,如果你在收纳袋中放入 5 个物品,就可以自定义格子的外观。
右键单击 - 运行第一个格子的命令。
Shift + 右键单击 - 运行第二个格子的命令。
左键单击 - 运行第三个格子的命令。
Shift + 左键单击 - 运行第四个格子的命令。

loot give @s loot menu:tile/dynamic/multi
固定菜单

允许你将当前命令菜单固定到当前位置。
固定命令菜单后,你可以与中央的图钉交互以自定义显示:
右键单击 - 隐藏命令菜单。
Shift + 右键单击 - 平面模式。
左键单击 - 将命令菜单返回给玩家。
Shift + 左键单击 - 隐藏图钉。

loot give @s loot menu:tile/dynamic/pin_menu
切换器

在当前格子上执行命令,并自动切换到列表中的下一个格子。

用此切换器右键单击容器,以向容器写入/从容器读取所有物品。

你还可以浏览格子列表:
右键单击 - 执行命令并切换到下一个。
Shift + 右键单击 - 执行命令并切换到上一个。
左键单击 - 跳过当前格子(不运行命令)并切换到下一个。
Shift + 左键单击 - 跳过当前格子(不运行命令)并切换到上一个。

loot give @s loot menu:tile/dynamic/switcher
路标

将玩家传送到保存的坐标。
默认情况下,路标格子不包含传送点。
第一次右键单击将保存当前位置并创建传送点。
传送可在维度之间工作。
你可以随时在铁砧上重命名路标格子,以命名该位置。

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

右键单击 - Создать waypont / телепортировать。
Shift + 右键单击 - Удалить текущий waypoint。

静态格子:

清除

清除玩家物品栏的一部分。

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)
维度

将玩家传送到指定维度的相同坐标。
这不是安全传送!请为此使用路标。

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
效果

对玩家施加一些效果

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
游戏模式

将玩家切换到指定游戏模式。

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
时间

设置游戏内白天时间。
天数计数器不会重置!

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
隐身

为玩家设置隐身。

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

设置天气。

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

我创建这个数据包的想法来自 psycrafteu 在 Reddit 上的这篇帖子。