适用于CubeX的假人套件,基于Mineflayer库
Find a file
2025-07-20 23:00:57 +08:00
MaiMCore add word guess solver 2025-07-02 18:10:32 +08:00
onlineChat update, incomplete memories function 2025-03-09 14:31:20 +08:00
.env.example add tools 2025-07-15 01:50:25 +08:00
.gitignore add batch mode 2025-07-10 20:06:48 +08:00
3rdparty_auth.js fixed oauth default profile id 2025-07-20 23:00:57 +08:00
answers.json update puzzle answer 2025-07-08 14:47:31 +08:00
app.batch.js update oauth client id 2025-07-16 22:39:41 +08:00
app.js update oauth client id 2025-07-16 22:39:41 +08:00
chatServer.js add MaiMCore adapter, removed steveai, add auto answer feature 2025-06-28 19:49:21 +08:00
fetch_mclang.js add wordlist downloader 2025-07-02 20:18:32 +08:00
gen_wordlist.js tiny fix: gen wordslist 2025-07-08 23:37:21 +08:00
LICENSE Initial commit 2025-03-02 17:48:32 +08:00
logger.js split huge script into small parts, many improves, add logger 2025-03-08 16:05:16 +08:00
mcAdapter.py add word guess solver 2025-07-02 18:10:32 +08:00
package-lock.json add tools 2025-07-15 01:50:25 +08:00
package.json add tools 2025-07-15 01:50:25 +08:00
puzzle.js update puzzle answer 2025-07-08 14:47:31 +08:00
README.md add tools 2025-07-15 01:50:25 +08:00
requirements.txt add MaiMCore adapter, removed steveai, add auto answer feature 2025-06-28 19:49:21 +08:00
tools.js update oauth client id 2025-07-16 22:39:41 +08:00
utils.js update, incomplete memories function 2025-03-09 14:31:20 +08:00

CubeX_Bot

fakeplayer suit for cubex minecraft server , based on mineflayer

适用于CubeX的假人套件基于Mineflayer库

开发分支

安装方式:

# 下载源码(如果没有下载的话)
git clone http://git.s3.fan/Steve3184/CubeX_Bot
cd CubeX_Bot

# 安装依赖
npm install

# (可选) 安装MaiMCore桥接器
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

# (可选) 开启MaiMCore Docker
cd MaiMCore
docker compose up -d

# (可选) 生成自动猜词词库
node fetch_mclang.js
node gen_wordlist.js

配置:

  1. 登录Minecraft账号
    • 运行npm run auth登录你的LittleSkin账号选择一个角色将自动生成config.json
    • 或使用正版登录,设置环境变量MS_EMAIL(邮箱)和MS_PASS(密码)
  2. 设置网页聊天WebUI的启动端口环境变量WEBCHAT_PORT,和主人环境变量OWNER
  3. (可选) 设置AI接口环境变量LLM_ENDPOINT,API_KEY,MODEL_QA
  4. (可选) 设置MaiMCore接口环境变量MAIMCORE_ENDPOINT
  5. 将所有的环境变量通过export设置或保存在.env文件中

示例配置(.env):

LLM_ENDPOINT = "https://yourai.api/v1"
API_KEY = "sk-1145141919810homo"
MODEL_QA = "qwen2.5:14b"
WEBCHAT_PORT = 7966
MAIMCORE_ENDPOINT = "ws://127.0.0.1:2890/ws"
OWNER = "Steve3184"

启动:

  1. 启动假人框架: npm start (批量模式:node app.batch.js)
  2. (可选) 启动MaiMCore适配器:
# 激活虚拟环境
source .venv/bin/activate
# 启动适配器
python3 mcAdapter.py

实用工具使用教程:

向Bot使用/msg <name> #<command>发起私信以执行命令,<name>替换为Bot的名字,<command>替换为要执行的命令

向Bot使用/msg <name> ?<command>发起私信可以Bot的身份发送聊天信息或命令

可用命令列表: ([name]代表名为name的参数是可选的,<name>代表名为name的参数是必须的)

  • right-click <interval> 让Bot右键放置方块或使用物品,<interval>为任意正整数,每隔interval毫秒右键一次
  • right-click hold 让Bot一直右键放置方块
  • right-click once 让Bot右键一次
  • left-click <interval> 让Bot左键攻击前方实体,<interval>为任意正整数,每隔interval毫秒左键一次
  • left-click hold 让Bot一直左键挖掘方块
  • left-click once 让Bot左键一次
  • jump 让Bot跳跃一次
  • shift 切换Bot的潜行状态
  • drop 让Bot丢出当前选中的物品
  • drop all 让Bot丢出背包所有物品
  • slot <id> 让Bot切换当前选中的快捷栏,<id>为0~8的整数
  • switch-hands 让Bot交换主手/副手物品
  • autoeat 切换自动进食功能
  • autofill 切换自动补货功能
  • autoback 切换死亡自动/back功能
  • antiafk 切换防挂机功能

使用示例:

在小黑塔挂机: /msg Steve #left-click 1750

自动刷石机:/msg Steve #left-click hold

自动放沙子:/msg Steve #right-click hold