BindAliasPlus
一个适用于 Minecraft Fabric 的客户端模组,允许创建自定义别名和按键绑定,通过简单的按键触发来自动化复杂的游戏内操作。它还支持通过游戏内 HTTP API 实现自主 AI 代理控制——代理可以独立地在 Minecraft 中观察、推理并行动。配合 BindAliasPlus MCP 工具 使用,即可让 AI 自动游玩游戏。
概览
BindAliasPlus 通过让你为一系列动作定义自定义别名并将其绑定到按键上,从而增强你的 Minecraft 游戏体验。无论你是需要快速切换物品栏槽位、自动化鞘翅飞行,还是串联多个动作(例如使用弓箭或放置甚至不在快捷栏或副手栏中的方块),该模组都通过可配置的别名和按键绑定简化了重复性任务。
功能特性
- 自定义别名:为单个或多个游戏内动作创建可复用的别名(例如交换物品、使用技能、移动)。
- 按键绑定:将别名绑定到按键,并支持在按下和释放按键时执行不同的动作。
- 内置别名:提供常见动作的预定义别名(例如
swapSlot、wait、use、attack)。
- 命令系统:直观的命令用于管理别名和绑定(例如
/alias、/bind、/unbind)。
- 配置持久化:将别名和绑定保存在配置文件中,加入服务器时自动加载。
- 连锁动作:组合别名以创建复杂序列(例如:装备鞘翅 → 使用烟花火箭 → 飞行)。
安装
- 确保你已为你的 Minecraft 版本安装了 Fabric Loader。
- 从 发布页面 下载最新的
bind-alias-plus-*.*.*.jar 文件。
- 将该 JAR 文件放入你的 Minecraft
mods 文件夹中。
- 使用 Fabric 加载器启动 Minecraft。
使用方法
核心概念
- 别名 (Alias):一个可执行的自定义或内置动作(或动作序列)。
- 按键绑定 (Key Binding):物理按键(例如
mouse5、keyboard.g)与别名之间的链接(可以是两个别名:一个用于按下,一个用于释放)。
内置别名
BindAliasPlus 包含用于常见动作的预建别名。它们分为带参数的别名和不带参数的别名。
带参数的别名
注意:槽位编号遵循 Minecraft 的内部编号规则:
- 1-9 → 快捷栏槽位
- 10-36 → 背包槽位(10-19 = 第一行)
- 37-40 → 装备槽位(37 = 脚部,38 = 腿部,39 = 胸部,40 = 头部)
- 41 → 副手槽位
- 你可以用双引号包裹参数,这样内部的空格就不会被当作分隔符。
- 嵌套定义推荐用法:当在其他别名定义内部使用
alias、bind、unbind、say、sendCommand 或 localSay 等内置别名时,请使用分号 ; 而不是空格 作为参数之间的分隔符。这允许你在嵌套定义中正常使用空格分隔符而不会产生冲突。示例:alias +testAlias bind\v;+anotherAlias alias\+yetAnotherAlias;+anotherAlias;+jump alias\+nextAlias;wait\2;+yetAnotherAlias wait\1 bind\x;+testAlias - 此处分号用于分隔这些内置别名的参数,而空格则正常工作。
| 别名 |
描述 |
示例 |
log |
向游戏控制台输出日志(用于调试)。 |
log\Hello World |
slot\槽位编号 |
切换到特定的快捷栏槽位(1-9)。支持变量名。 |
slot\3(切换到快捷栏第 3 格),slot\mySlot(使用变量) |
swapSlot\槽位1\槽位2 |
在两个物品栏槽位之间交换物品(1-9 为快捷栏,10-36 为背包,37-40 为护甲,41 为副手)。在任何容器界面中均可用;使用 cN 表示打开菜单中的第 N 个槽位(例如工作台 c1 = 结果栏,熔炉 c3 = 输出栏)——可启用合成/锻造/附魔。支持变量名(仅限普通槽位)。 |
swapSlot\10\39(将背包第 10 格与胸甲槽位交换),swapSlot\c1\10(将合成结果放入第 10 格) |
swapSlot\槽位1 |
将当前手持的快捷栏槽位(主手)与指定的 槽位1 交换物品。支持变量名。 |
swapSlot\19(将当前快捷栏槽位与背包第 19 格交换) |
wait\刻数 |
暂停执行指定的刻数(20 刻 = 1 秒)。支持变量名。 |
wait\20(等待 1 秒),wait\myTicks(使用变量) |
yaw\角度 |
调整玩家水平旋转角度(Yaw),基于相对度数。支持变量名。 |
yaw\90(向右转 90°),yaw\myVar(使用变量) |
pitch\角度 |
调整玩家垂直旋转角度(Pitch),基于相对度数。支持变量名。 |
pitch\-30(向下看 30°),pitch\myVar(使用变量) |
setYaw\角度 |
将玩家水平旋转角度(Yaw)设置为绝对度数(0 = 北,90 = 东)。支持变量名。 |
setYaw\180(面向南),setYaw\myVar(使用变量) |
setPitch\角度 |
将玩家垂直旋转角度(Pitch)设置为绝对度数(-90 = 正上方,90 = 正下方)。支持变量名。 |
setPitch\0(直视前方),setPitch\myVar(使用变量) |
alias\参数 |
几乎与命令别名相同,但需用双引号包裹参数。 |
alias\"meow say\nya~"(创建或替换一个别名) |
bind\参数 |
几乎与命令绑定相同,但需用双引号包裹参数。 |
bind\"m meow wait\0 +fly"(创建或替换一个按键绑定) |
unbind\键名 |
几乎与命令解绑相同。 |
unbind\m(解除某键上的所有绑定) |
say\字符串 |
发送聊天消息。 |
say\"How old r u?"(发送聊天消息 "how old r u?") |
localSay\字符串 |
仅在本机客户端显示聊天消息,不发送给服务器。适用于测试、通知和调试输出。 |
localSay\"Debug: slot is \(mySlot)"(仅本地消息) |
sendCommand\命令 |
发送命令。 |
sendCommand\"gamemode creative"(发送命令 "gamemode creative") |
var\变量名\来源 |
将值存储到变量中。来源包括:hotbarSlot、itemsOfSlot0-9、pitch、yaw 或数字。 |
var\mySlot\hotbarSlot(存储快捷栏槽位),var\angle\pitch(存储俯仰角) |
reapply\动作 |
手动重新应用按下的布尔型别名(攻击、使用、前进、后退、左移、右移、跳跃、潜行、疾跑、丢弃、打开物品栏)。常用于用户别名末尾,特别是在界面切换之后。 |
reapply\forward(如果按住前进键则重新按下) |
openInventory\状态 |
打开(1)或关闭(0)物品栏界面。 |
openInventory\1(打开物品栏),openInventory\0(关闭物品栏) |
数值型别名支持变量引用: yaw、pitch、setYaw、setPitch、slot、swapSlot、wait 和 setPerspective 均接受变量名(如 yaw\myVar 或 slot\mySlot)代替原始数字。
无参数的别名
这些是简写别名,映射到常见的 state=1(开始)和 state=0(停止)操作,以便更简单地使用:
| 别名 |
等价于 |
描述 |
+attack |
builtinAttack\1 |
开始攻击(按住左键)。 |
-attack |
builtinAttack\0 |
停止攻击(松开左键)。 |
+use |
builtinUse\1 |
开始使用手持物品(按住右键)。 |
-use |
builtinUse\0 |
停止使用手持物品(松开右键)。 |
+forward |
builtinForward\1 |
开始向前移动。 |
-forward |
builtinForward\0 |
停止向前移动。 |
+back |
builtinBack\1 |
开始向后移动。 |
-back |
builtinBack\0 |
停止向后移动。 |
+left |
builtinLeft\1 |
开始向左移动。 |
-left |
builtinLeft\0 |
停止向左移动。 |
+right |
builtinRight\1 |
开始向右移动。 |
-right |
builtinRight\0 |
停止向右移动。 |
+jump |
builtinJump\1 |
开始跳跃(按住跳跃键)。 |
-jump |
builtinJump\0 |
停止跳跃(松开跳跃键)。 |
+sneak |
builtinSneak\1 |
开始潜行(按住潜行键)。 |
-sneak |
builtinSneak\0 |
停止潜行(松开潜行键)。 |
+sprint |
builtinSprint\1 |
开始疾跑(按住疾跑键)。 |
-sprint |
builtinSprint\0 |
停止疾跑(松开疾跑键)。 |
+drop |
builtinDrop\1 |
按下丢弃键。持续按住会连续丢弃物品,适用于3D游戏界面和容器/背包界面(兼容原版,具有初始重复延迟)。与键盘控制键结合使用时,一次性丢弃完整堆叠的物品。 |
-drop |
builtinDrop\0 |
松开丢弃键。 |
+openInventory |
builtinOpenInventory\1 |
打开背包界面。 |
-openInventory |
builtinOpenInventory\0 |
关闭背包界面(如果已打开)。 |
pickItem |
— |
触发原版的选取方块功能,作用于目标方块或实体。 |
swapHand |
_ |
在主手和副手之间交换物品。 |
+silent |
builtinSilent\1 |
启用静默模式(抑制命令反馈消息)。 |
-silent |
builtinSilent\0 |
禁用静默模式(重新启用命令反馈消息)。 |
+lockKey\<target> |
builtinLock\<target>\1 |
锁定某个游戏按键或自定义别名。对于原版按键,请使用 gameKey:attack、gameKey:forward 等;对于自定义别名,请使用别名名称。 |
-lockKey\<target> |
builtinLock\<target>\0 |
解锁之前锁定的游戏按键或自定义别名。 |
cyclePerspective |
— |
循环切换摄像机视角(第一人称 → 第三人称后方 → 第三人称前方)。 |
FPS |
builtinSetPerspective\0 |
切换到第一人称视角。 |
TPS |
builtinSetPerspective\1 |
切换到第三人称后方视角。 |
TPS2 |
builtinSetPerspective\2 |
切换到第三人称前方视角。 |
reloadCFG |
— |
重新加载配置文件(无需重启即可应用更改)。 |
unloadCFGAliases |
— |
移除所有从配置文件加载的别名。 |
unloadCFGBinds |
— |
移除所有从配置文件加载的按键绑定。 |
unloadCFGVars |
— |
移除所有从配置文件加载的变量。 |
unloadCFGAll |
— |
移除从配置文件中加载的所有别名、按键绑定和变量。 |
变量
变量允许你捕获并在游戏中重用数值(快捷栏槽位、俯仰角/偏航角、物品数量等)。
var\varName\source 的来源:
| 来源 |
描述 |
示例 |
hotbarSlot |
当前快捷栏槽位(1-9) |
var\mySlot\hotbarSlot |
itemsOfSlotN |
N号槽位的物品数量(0=副手,1-9=快捷栏) |
var\count\itemsOfSlot2 |
pitch |
玩家当前的俯仰角(浮点数) |
var\myPitch\pitch |
yaw |
玩家当前的偏航角(浮点数) |
var\myYaw\yaw |
42 or 3.14 |
字面量数字(整数或浮点数) |
var\backup\42 |
变量随后可以用作任何数值别名的参数(例如 yaw\myVar、slot\mySlot、wait\myTicks)。
与变量相关的命令:
| 命令 |
用途 |
示例 |
/var <name> <source> |
创建或更新一个变量。 |
/var mySlot hotbarSlot |
/unloadCFGVars |
移除所有从配置加载的变量。 |
/unloadCFGVars |
示例配置
这是一个真实的配置文件(config/bind-alias-plus.cfg),在单一位置展示了关键功能:
/var offHand 41
/alias jumpOnce +jump wait\0 -jump
## 36->鞘翅; 27->烟花火箭
/alias +fly swapSlot\36\39 jumpOnce wait\0 jumpOnce swapSlot\27\41 +use -use TPS
/alias -fly swapSlot\36\39 swapSlot\27\41 wait\2 FPS
/alias +fastUse_Var swapSlot\varFastUse\offHand +use
/alias -fastUse_Var -use swapSlot\varFastUse\offHand
/alias +fastAttack_Var swapSlot\varFastAttack wait\1 +attack
/alias -fastAttack_Var -attack swapSlot\varFastAttack
# alias fly_on +silent bind\"mouse5 fly_off" -silent +fly
# alias fly_off +silent bind\"mouse5 fly_on" -silent -fly
/bind w +forward
/bind a +left
/bind s +back
/bind d +right
/bind space +jump
/bind left.shift +sneak
/bind left.control +sprint
/bind mouse1 +attack
/bind mouse2 +use
/bind mouse5 +fly
## 水; 细雪; 食物; 末影珍珠; 弓;... 3个快速使用槽位
/bind mouse4 var\varFastUse\19 +fastUse_Var
/bind b var\varFastUse\20 +fastUse_Var
/bind v var\varFastUse\28 +fastUse_Var
## 效率镐 1个快速挖掘槽位
/bind n var\varFastAttack\29 +fastAttack_Var
配置说明
- 配置文件:位于
config/bind-alias-plus.cfg。如果不存在则会自动创建。
- 自动加载:模组加载时,配置文件中的别名和绑定会自动加载。
- 手动编辑:您可以直接编辑配置文件以添加或修改别名/绑定(使用与游戏内命令相同的语法)。完整的真实示例请参阅上方的 示例配置 部分。
命令参考
| 命令 |
用途 |
示例 |
/alias <name> <definition> |
创建自定义别名。 |
/alias myAlias +jump wait\1 -jump |
/bind <key> <definition> |
将按键绑定到由该命令定义或现有别名的序列。对于每个以 + 或 - 开头且由除号(双引号内的内容仍视为一个整体块)分隔的定义,它将创建一个相反的别名。例如第一个例子中,它还将 -forward 和 +back 绑定到键盘按键 g 的释放操作。 |
/bind g +forward wait\10 -back OR /bind n +drop |
/bindByAliasName <key> <alias> |
将按键绑定到现有的别名。 |
/bindByAliasName mouse5 +fly |
/unbind <key> |
移除按键绑定。 |
/unbind mouse5 |
/reloadCFG |
从配置文件重新加载设置。 |
/reloadCFG |
/var <name> <source> |
创建/更新变量。来源包括:hotbarSlot、itemsOfSlot0-9、pitch、yaw,或一个数字。 |
/var mySlot hotbarSlot, /var angle pitch |
/unloadCFGAliases |
移除所有从配置文件中加载的别名。 |
/unloadCFGAliases |
/unloadCFGBinds |
移除所有从配置文件中加载的按键绑定。 |
/unloadCFGBinds |
/unloadCFGVars |
移除所有从配置文件中加载的变量。 |
/unloadCFGVars |
/unloadCFGAll |
移除所有从配置文件中加载的别名、按键绑定和变量。 |
/unloadCFGAll |
注意事项
- 兼容性:适用于大多数 Fabric 模组;可能会与修改按键处理或物品栏机制的模组发生冲突。
- Minecraft 版本:需要 Minecraft 1.21+(Yarn 映射)或 26.x(Mojang 映射)。请查看发布页面获取特定版本的构建文件(文件名中包含 MC 版本号)。
- 变量:支持整数和浮点数值。数值型别名(
yaw、pitch、setYaw、setPitch、slot、swapSlot、wait、setPerspective)允许使用变量名代替原始数字。
- 安全性:在带有反作弊系统的服务器上避免过度自动化操作(某些行为可能会被标记为异常)。
贡献指南
欢迎贡献!如有 Bug 报告或功能请求,请随时提交 Issue;如有改进建议,也欢迎提交 Pull Request。
许可证
本模组采用 Creative Commons Zero v1.0 Universal 许可证授权。
BindAliasPlus
A Minecraft Fabric client mod that allows creating custom aliases and key bindings to automate complex in-game actions with simple key presses. Also enables autonomous AI agent control via an in-game HTTP API — agents can see,
reason about, and act in Minecraft independently. Use with the
BindAliasPlus MCP tool to let AI play the game.
Overview
BindAliasPlus enhances your Minecraft gameplay by letting you define custom aliases for sequences of actions and bind
them to keys. Whether you need to quickly swap inventory slots, automate elytra flight, or chain multiple actions (like
using a bow or placing blocks that not even in your hotbars or second hand), this mod simplifies repetitive tasks through configurable aliases and key bindings.
Features
- Custom Aliases: Create reusable aliases for single or multiple in-game actions (e.g., swap items, use abilities,
move).
- Key Bindings: Bind aliases to keys, with support for separate actions on key press and release.
- Built-in Aliases: Predefined aliases for common actions (e.g.,
swapSlot, wait, use, attack).
- Command System: Intuitive commands to manage aliases and bindings (e.g.,
/alias, /bind, /unbind).
- Config Persistence: Saves aliases and bindings in a config file, loaded automatically when joining servers.
- Chained Actions: Combine aliases to create complex sequences (e.g., equip elytra → use firework → fly).
Installation
- Ensure you have Fabric Loader installed for your Minecraft version.
- Download the latest
bind-alias-plus-*.*.*.jar from
the releases page.
- Place the JAR file in your Minecraft
mods folder.
- Launch Minecraft with the Fabric loader.
Usage
Core Concepts
- Alias: A custom or built-in action (or sequence of actions) that can be executed.
- Key Binding: A link between a physical key (e.g.,
mouse5, keyboard.g) and an alias (or two aliases: one for
press, one for release).
Built-in Aliases
BindAliasPlus includes prebuilt aliases for common actions. They are divided into aliases with arguments and *
aliases without arguments*.
Aliases with Arguments
Note: Slots follow Minecraft's internal numbering:
- 1-9 → Hotbar slots
- 10-36 → Inventory slots (10-19 = first row)
- 37-40 → Equipment slots (37 = feet, 38 = legs, 39 = chest, 40 = head)
- 41 → Offhand slot
- u can cover args with double quotes so that the white space inside will not be referred as split mark.
- RECOMMENDED for nested definitions: When using
alias, bind, unbind, say, sendCommand, or localSay builtin aliases inside other alias definitions, use semicolon ; instead of space as the divider between arguments. This allows you to use normal space dividers in the nested definition without conflict. Example: alias +testAlias bind\v;+anotherAlias alias\+yetAnotherAlias;+anotherAlias;+jump alias\+nextAlias;wait\2;+yetAnotherAlias wait\1 bind\x;+testAlias - here semicolons separate the arguments for these builtin aliases, while spaces work normally.
| Alias |
Description |
Example |
log |
Logs a message to the game console (for debugging). |
log\Hello World |
slot\slotNumber |
Switches to a specific hotbar slot (1-9). Accepts variable names. |
slot\3 (switches to hotbar slot 3), slot\mySlot (uses variable) |
swapSlot\slot1\slot2 |
Swaps items between two inventory slots (1-9 hotbar, 10-36 inventory, 37-40 armor, 41 offhand). Works in any container screen; use cN for the Nth slot of the open menu (e.g. crafting table c1 = result, furnace c3 = output) — enables crafting/forging/enchanting. Accepts variable names (plain slots only). |
swapSlot\10\39 (swaps inventory slot 10 with chestplate slot), swapSlot\c1\10 (takes crafting result into slot 10) |
swapSlot\slot1 |
Swaps items between the currently held hotbar slot (main hand) and the specified slot1. Accepts variable names. |
swapSlot\19 (swaps current hotbar slot with inventory slot 19) |
wait\ticks |
Pauses execution for a specified number of ticks (20 ticks = 1 second). Accepts variable names. |
wait\20 (waits 1 second), wait\myTicks (uses variable) |
yaw\degrees |
Adjusts player yaw (horizontal rotation) by a relative degree value. Accepts variable names. |
yaw\90 (turns 90° right), yaw\myVar (uses variable) |
pitch\degrees |
Adjusts player pitch (vertical rotation) by a relative degree value. Accepts variable names. |
pitch\-30 (looks 30° down), pitch\myVar (uses variable) |
setYaw\degrees |
Sets player yaw to an absolute degree value (0 = north, 90 = east). Accepts variable names. |
setYaw\180 (faces south), setYaw\myVar (uses variable) |
setPitch\degrees |
Sets player pitch to an absolute degree value (-90 = straight up, 90 = straight down). Accepts variable names. |
setPitch\0 (looks straight ahead), setPitch\myVar (uses variable) |
alias\args |
almost same as command alias, except u need to cover args with double quotes. |
alias\"meow say\nya~" (create or replace an alias) |
bind\args |
almost same as command bind, except u need to cover args with double quotes. |
bind\"m meow wait\0 +fly" (create or replace a bind) |
unbind\keyName |
almost same as command unbind. |
unbind\m (unbind binds on a key) |
say\string |
say a chat message. |
say\"How old r u?" (send a chat message that is "how old r u?") |
localSay\string |
display a chat message on the local client only, without sending to the server. Useful for testing, notifications, and debug output. |
localSay\"Debug: slot is \(mySlot)" (local-only message) |
sendCommand\command |
send a command. |
sendCommand\"gamemode creative" (send a command that is "gamemode creative") |
var\varName\source |
Store a value into a variable. Sources: hotbarSlot, itemsOfSlot0-9, pitch, yaw, or a number. |
var\mySlot\hotbarSlot (store hotbar slot), var\angle\pitch (store pitch angle) |
reapply\action |
Manually re-assert a held-down boolean alias (attack, use, forward, back, left, right, jump, sneak, sprint, drop, openInventory). Useful at the end of a UserAlias after screen transitions. |
reapply\forward (re-presses forward key if held) |
openInventory\state |
Opens (1) or closes (0) the inventory screen. |
openInventory\1 (opens inventory), openInventory\0 (closes inventory) |
Numeric aliases support variable references: yaw, pitch, setYaw, setPitch, slot, swapSlot, wait, and setPerspective all accept variable names (e.g., yaw\myVar or slot\mySlot) in place of raw numbers.
Aliases without Arguments
These are shorthand aliases that map to common state=1 (start) and state=0 (stop) actions for simpler usage:
| Alias |
Equivalent To |
Description |
+attack |
builtinAttack\1 |
Starts attacking (holds left-click). |
-attack |
builtinAttack\0 |
Stops attacking (releases left-click). |
+use |
builtinUse\1 |
Starts using held item (holds right-click). |
-use |
builtinUse\0 |
Stops using held item (releases right-click). |
+forward |
builtinForward\1 |
Starts moving forward. |
-forward |
builtinForward\0 |
Stops moving forward. |
+back |
builtinBack\1 |
Starts moving backward. |
-back |
builtinBack\0 |
Stops moving backward. |
+left |
builtinLeft\1 |
Starts moving left. |
-left |
builtinLeft\0 |
Stops moving left. |
+right |
builtinRight\1 |
Starts moving right. |
-right |
builtinRight\0 |
Stops moving right. |
+jump |
builtinJump\1 |
Starts jumping (holds jump key). |
-jump |
builtinJump\0 |
Stops jumping (releases jump key). |
+sneak |
builtinSneak\1 |
Starts sneaking (holds sneak key). |
-sneak |
builtinSneak\0 |
Stops sneaking (releases sneak key). |
+sprint |
builtinSprint\1 |
Starts sprinting (holds sprint key). |
-sprint |
builtinSprint\0 |
Stops sprinting (releases sprint key). |
+drop |
builtinDrop\1 |
Presses the drop key. Holding continuously drops items in both the 3D game and container/inventory screens (vanilla-compatible, with initial repeat-delay). Drops full stack when combined with keyboard control key. |
-drop |
builtinDrop\0 |
Releases the drop key. |
+openInventory |
builtinOpenInventory\1 |
Opens the inventory screen. |
-openInventory |
builtinOpenInventory\0 |
Closes the inventory screen (if open). |
pickItem |
— |
Triggers vanilla pick-block on the targeted block/entity. |
swapHand |
_ |
Swaps items between main hand and offhand. |
+silent |
builtinSilent\1 |
Enables silent mode (suppresses command feedback messages). |
-silent |
builtinSilent\0 |
Disables silent mode (re-enables command feedback messages). |
+lockKey\<target> |
builtinLock\<target>\1 |
Locks a game key or custom alias. Use gameKey:attack, gameKey:forward, etc. for vanilla keys, or an alias name for custom aliases. |
-lockKey\<target> |
builtinLock\<target>\0 |
Unlocks a previously locked game key or custom alias. |
cyclePerspective |
— |
Cycles through camera perspectives (FPS → TPS → TPS2). |
FPS |
builtinSetPerspective\0 |
Switches to first-person view. |
TPS |
builtinSetPerspective\1 |
Switches to third-person back view. |
TPS2 |
builtinSetPerspective\2 |
Switches to third-person front view. |
reloadCFG |
— |
Reloads the config file (applies changes without restarting). |
unloadCFGAliases |
— |
Removes all aliases that were loaded from the config file. |
unloadCFGBinds |
— |
Removes all keybindings that were loaded from the config file. |
unloadCFGVars |
— |
Removes all variables that were loaded from the config file. |
unloadCFGAll |
— |
Removes all aliases, keybindings, and variables loaded from config. |
Variables
Variables let you capture and reuse in-game values (hotbar slot, pitch/yaw angles, item
counts, etc.).
Sources for var\varName\source:
| Source |
Description |
Example |
hotbarSlot |
Current hotbar slot (1-9) |
var\mySlot\hotbarSlot |
itemsOfSlotN |
Item count in slot N (0=offhand, 1-9=hotbar) |
var\count\itemsOfSlot2 |
pitch |
Player's current pitch angle (float) |
var\myPitch\pitch |
yaw |
Player's current yaw angle (float) |
var\myYaw\yaw |
42 or 3.14 |
A literal number (int or float) |
var\backup\42 |
Variables can then be used as arguments in any numeric alias (e.g., yaw\myVar,
slot\mySlot, wait\myTicks).
Variable-related commands:
| Command |
Purpose |
Example |
/var <name> <source> |
Create or update a variable. |
/var mySlot hotbarSlot |
/unloadCFGVars |
Remove all config-loaded variables. |
/unloadCFGVars |
Example Config
Here's a real-world config file (config/bind-alias-plus.cfg) showing the key features in one place:
/var offHand 41
/alias jumpOnce +jump wait\0 -jump
## 36->elytra; 27->firework
/alias +fly swapSlot\36\39 jumpOnce wait\0 jumpOnce swapSlot\27\41 +use -use TPS
/alias -fly swapSlot\36\39 swapSlot\27\41 wait\2 FPS
/alias +fastUse_Var swapSlot\varFastUse\offHand +use
/alias -fastUse_Var -use swapSlot\varFastUse\offHand
/alias +fastAttack_Var swapSlot\varFastAttack wait\1 +attack
/alias -fastAttack_Var -attack swapSlot\varFastAttack
# alias fly_on +silent bind\"mouse5 fly_off" -silent +fly
# alias fly_off +silent bind\"mouse5 fly_on" -silent -fly
/bind w +forward
/bind a +left
/bind s +back
/bind d +right
/bind space +jump
/bind left.shift +sneak
/bind left.control +sprint
/bind mouse1 +attack
/bind mouse2 +use
/bind mouse5 +fly
## water; powder_snow; food; ender_pearl; bow;... 3 fast use slots
/bind mouse4 var\varFastUse\19 +fastUse_Var
/bind b var\varFastUse\20 +fastUse_Var
/bind v var\varFastUse\28 +fastUse_Var
## fortune_pickaxe 1 fast mine slot
/bind n var\varFastAttack\29 +fastAttack_Var
Configuration
- Config File: At
config/bind-alias-plus.cfg. Automatically created if there is not one.
- Auto-Load: Aliases and bindings in the config file are loaded automatically when the mod loads.
- Manual Edit: You can directly edit the config file to add/modify aliases/bindings (use the same syntax as in-game
commands). See the Example Config section above for a complete real-world config.
Commands Reference
| Command |
Purpose |
Example |
/alias <name> <definition> |
Create a custom alias. |
/alias myAlias +jump wait\1 -jump |
/bind <key> <definition> |
Bind a key to a sequence of aliases by definition of this command or an existing alias.For each definition split by divide mark(things inside double quotes would still be a same block) starts with + or -, it will create an opposite alias. For the 1st eg, it also bind -forward and +back to release of keyboard key g |
/bind g +forward wait\10 -back OR /bind n +drop |
/bindByAliasName <key> <alias> |
Bind a key to an existing alias. |
/bindByAliasName mouse5 +fly |
/unbind <key> |
Remove a key binding. |
/unbind mouse5 |
/reloadCFG |
Reload config from file. |
/reloadCFG |
/var <name> <source> |
Create/update a variable. Sources: hotbarSlot, itemsOfSlot0-9, pitch, yaw, or a number. |
/var mySlot hotbarSlot, /var angle pitch |
/unloadCFGAliases |
Remove all aliases loaded from config. |
/unloadCFGAliases |
/unloadCFGBinds |
Remove all keybindings loaded from config. |
/unloadCFGBinds |
/unloadCFGVars |
Remove all variables loaded from config. |
/unloadCFGVars |
/unloadCFGAll |
Remove all aliases, binds, and variables loaded from config. |
/unloadCFGAll |
Notes
- Compatibility: Works with most Fabric mods; may conflict with mods that modify key handling or inventory
mechanics.
- Minecraft Version: Requires Minecraft 1.21+ (Yarn mappings) or 26.x (Mojang mappings). Check the release page
for version-specific builds (filenames include the MC version).
- Variables: Supports integer and floating-point values. Numeric aliases (
yaw, pitch, setYaw, setPitch,
slot, swapSlot, wait, setPerspective) accept variable names in place of raw numbers.
- Safety: Avoid excessive automation on servers with anti-cheat systems (some actions may be flagged).
Contributing
Contributions are welcome! Feel free to open issues for bugs/feature requests or submit pull requests with improvements.
License
This mod is licensed under the Creative Commons Zero v1.0 Universal.
评论 0
登录后参与评分
还没有评论,来抢沙发吧