命令宏键

命令宏键

你有一些常用命令吗?如果你觉得一遍又一遍地输入很无聊乏味,那么现在你可以绑定快捷键来执行命令了。

游戏机制

你是否觉得常用命令重复执行既无聊又繁琐?现在你可以绑定快捷键来执行命令了。

宏类型

  • 单次

  • 延迟

  • 重复

  • 按键是对应于你想使用的键的数字编号。列表可在此查看:https://www.glfw.org/docs/3.3/group__keys.html

  • 你可以使用/macro reload命令来热加载更新。

  • 如果命令字段中没有"/",它将被作为聊天文本发送。

  • 你可以使用\n作为分隔符来连续执行多个命令,例如"Hello World\nHello Minecraft"。

  • 针对特定场景,模组提供常用占位符作为替代,例如"/gamemode creative %player_name%"。

占位符

player_name
player_pos_x
player_pos_y
player_pos_z
player_pos
player_health
player_food
player_exp
player_level
player_dimension
player_biome
player_facing
player_xRot
player_yRot
player_uuid
[
  {
    "macro":"command_macro_key:single",
    "command": "/gamemode creative",
    "primaryKey": 334,
    "modifierKey": 0
  },
  {
    "macro":"command_macro_key:delayed",
    "command": "/gamemode creative",
    "primaryKey": 334,
    "modifierKey": 0,
    "delay": 60
  },
  {
    "macro":"command_macro_key:repeating",
    "command": "/gamemode creative",
    "primaryKey": 334,
    "modifierKey": 0,
    "repeat": 5,
    "interval": 20
  },
  {
    "macro":"command_macro_key:single",
    "command": "/gamemode creative",
    "primaryKey": 334,
    "modifierKey": 0,

    //可选字段
    //仅在macros-server.json5配置中生效,如果存在此字段,权限将被忽略。
    "hasOp": true,

    //可选字段
    //仅对特定存档生效
    "location": ".\\saves\\~~~~~"
  }
]