? Kashub – Minecraft 内置脚本引擎
带有内置 VSCode 风格编辑器的游戏内脚本与自动化框架
厌倦了重复性任务?想要自动化农场、建筑或刷怪?Kashub 为 Minecraft 添加了一个强大的脚本层,并配备了一个受 VSCode 启发的精美内置代码编辑器。
⚡ 为什么选择 Kashub?
与其他需要外部工具或复杂设置的自动化模组不同,Kashub 提供了一切在游戏内完成的功能:
- 无需外部编辑器 – 按
K 即可打开编辑器
- 易于学习 – KHScript 拥有受 Lua/JavaScript 启发的语法
- 美观的 UI – 10+ 种专业编辑器主题
- 经多人服务器验证 – 已在真实服务器的实际场景中使用
- 开源 – MIT 许可证,完全透明
? 主要功能
内置代码编辑器
- KHScript 语法高亮
- 自动补全 (Ctrl+Space)
- 10+ 种主题 – Dracula、One Dark Pro、Tokyo Night、Cyberpunk 等
- 搜索与脚本浏览器 – 快速查找和管理脚本
- 快捷键支持 – 使用热键启动脚本
脚本引擎
- 44+ 条命令 – 移动、交互、基础战斗逻辑、物品栏、世界工具
- 事件系统 – 响应伤害、刻(ticks)、聊天、死亡等事件
- 变量与逻辑 –
if/else、for、while、简单的控制流
- 环境变量 – 例如
$PLAYER_HEALTH、$PLAYER_X、$PLAYER_Y、$PLAYER_Z
开发者工具
- 日志系统 – 跟踪脚本执行和调试输出
- 任务管理器 – 同时运行多个脚本
- 清晰的错误处理 – 提供有帮助的错误信息,而非静默失败
? 公平竞技与服务端控制
Kashub 旨在成为对服务端友好的模组:
- 计划中的服务端权威控制 (将在更新
v0.9.0-beta 中推出):
- 可覆盖客户端设置的服务端配置
- 能够在特定服务器上禁用编辑器
- 能够阻止在客户端上运行特定的命令/命名空间
- 客户端尊重服务端的决定,并不会尝试绕过它们
这让服务器管理员可以决定在他们的服务器上允许多少自动化行为(或者完全禁用),同时仍让玩家在单人模式或私人世界中享受 Kashub。
? 快速开始
- 安装 Fabric 1.21.1 和 Fabric API
- 将 Kashub 放入你的
mods 文件夹
- 启动 Minecraft 并按
K 打开编辑器

- 编写你的第一个脚本:
// Auto-heal when low HP
onEvent onDamage {
if ($PLAYER_HEALTH < 10) {
eat golden_apple
print "Emergency heal!"
}
}
- 按 F5 运行!
? 示例脚本
自动农场
// Tree farm automation
loop 100 {
lookAt nearest oak_log
mine
wait 500
}
自动战斗(PvE 风格)
// Auto-attack nearby mobs
onEvent onTick {
if (nearestEntity zombie < 5) {
attack entity zombie
}
}
智能挖矿
// Mine only diamond ore
scanner start diamond_ore
loop {
if ($SCANNER_FOUND) {
pathTo $SCANNER_X $SCANNER_Y $SCANNER_Z
mine
}
wait 1000
}
? 自定义

? 游戏内文档

? 技术细节
- 语言: KHScript(自定义脚本语言)
- 命令: 44+ 个内置自动化命令
- 加载器: Fabric 1.21.1
- 依赖项: Fabric API
- 许可证: MIT
⚠ Beta 通知
这是一个 BETA 版本:
- 核心功能稳定且可用
- 可能存在一些边缘情况
- 非常欢迎反馈和错误报告
请在 GitHub Issues 上报问题。
? 链接
- GitHub:
- 文档: 通过游戏内的“Docs”按钮获取(列出所有命令)
- Discord: KasHub Community
? 许可证
MIT 许可证 – 欢迎 Fork、贡献并为其他加载器构建移植版(请注明出处)。
由 KasperStudios 用 ❤️ 制作
面向高级用户和服务端管理员的游戏内脚本与自动化
支持
我利用业余时间独立开发 KasHub。如果这个模组为你节省了时间、减轻了压力,或者你只是单纯喜欢使用它,你可以支持作者以帮助带来更多更新和新功能:
支持开发:
你可以通过 GitHub Issues 或在我们的 Discord 服务器上报告错误、分享想法并提出合理的改进建议。
🎮 Kashub – In‑Game Scripting Engine for Minecraft
In‑game scripting and automation framework with a built‑in VSCode‑style editor
Tired of repetitive tasks? Want to automate farming, building, or grinding? Kashub adds a powerful scripting layer to Minecraft with a beautiful built‑in code editor inspired by VSCode.
⚡ Why Kashub?
Unlike other automation mods that require external tools or complex setups, Kashub gives you everything in‑game:
- No external editors needed – Open the editor with
K
- Easy to learn – KHScript with Lua/JavaScript‑inspired syntax
- Beautiful UI – 10+ professional editor themes
- Multiplayer‑proven – Used on real servers in real scenarios
- Open source – MIT License, fully transparent
🔥 Key Features
Built‑in Code Editor
- Syntax highlighting for KHScript
- Auto‑completion (Ctrl+Space)
- 10+ themes – Dracula, One Dark Pro, Tokyo Night, Cyberpunk, and more
- Search & script browser – Find and manage scripts quickly
- Keybind support – Launch scripts with hotkeys
Scripting Engine
- 44+ commands – Movement, interaction, basic combat logic, inventory, world utilities
- Event system – React to damage, ticks, chat, deaths and more
- Variables & logic –
if/else, for, while, simple control flow
- Environment variables – e.g.
$PLAYER_HEALTH, $PLAYER_X, $PLAYER_Y, $PLAYER_Z
Developer Tools
- Logging system – Track script execution and debug output
- Task manager – Run multiple scripts at the same time
- Clear error handling – Helpful error messages instead of silent failures
🛡 Fair‑Play & Server Control
Kashub is designed to be server‑friendly:
- Planned server‑authoritative control (will be in update
v0.9.0-beta):
- Server‑side config that can override client settings
- Ability to disable the editor on specific servers
- Ability to block specific commands / namespaces from running on the client
- The client respects server decisions and does not try to bypass them
This lets server owners decide how much automation is allowed on their server (or disable it entirely) while still letting players enjoy Kashub in singleplayer or private worlds.
📚 Quick Start
- Install Fabric 1.21.1 and Fabric API
- Drop Kashub into your
mods folder
- Launch Minecraft and press
K to open the editor

- Write your first script:
// Auto-heal when low HP
onEvent onDamage {
if ($PLAYER_HEALTH < 10) {
eat golden_apple
print "Emergency heal!"
}
}
- Press F5 to run!
💡 Example Scripts
Auto‑Farm
// Tree farm automation
loop 100 {
lookAt nearest oak_log
mine
wait 500
}
Auto‑Combat (PvE‑style)
// Auto-attack nearby mobs
onEvent onTick {
if (nearestEntity zombie < 5) {
attack entity zombie
}
}
Smart Mining
// Mine only diamond ore
scanner start diamond_ore
loop {
if ($SCANNER_FOUND) {
pathTo $SCANNER_X $SCANNER_Y $SCANNER_Z
mine
}
wait 1000
}
🎨 Customization

📚 In‑Game Docs

🛠 Technical Details
- Language: KHScript (custom scripting language)
- Commands: 44+ built‑in automation commands
- Loader: Fabric 1.21.1
- Dependencies: Fabric API
- License: MIT
⚠ Beta Notice
This is a BETA release:
- Core features are stable and usable
- Some edge cases may still exist
- Feedback and bug reports are very welcome
Please report issues on GitHub Issues.
🔗 Links
- GitHub:
- Documentation: In‑game via the “Docs” button (all commands listed)
- Discord: KasHub Community
📜 License
MIT License – feel free to fork, contribute, and build ports for other loaders (with proper credit).
Made with ❤️ by KasperStudios
In‑game scripting and automation for power users and server owners
Support
I develop KasHub on my own in my spare time. If this mod has saved you time, reduced your stress, or you simply enjoy using it, you can support the author to help bring more updates and new features:
Support development:
You can report bugs, share ideas, and make reasonable suggestions for improvement via GitHub Issues or on our Discord server.
评论 0
登录后参与评分
还没有评论,来抢沙发吧