CodeBox
使用此 Slimefun 插件在 Minecraft 中编写代码
适用于 Paper 26.2 服务器的 Slimefun4 插件。在游戏中使用“代码纸 + 书写台 + 编译器”构建可视化编程系统,并通过红石信号运行你的程序。
本项目功能介绍
CodeBox 是一个 Slimefun4 插件,允许你在生存服务器上通过游戏内物品来编写和运行程序。无需外部工具——所有操作均在 Minecraft 内部完成。
三大核心物品(均位于“简易编程”分类下,通过高级工作台合成)
· 代码纸 — 程序的“载体”,每张纸可存储一行代码
· 书写台 — 用于将指令写入代码纸的图形化界面
· 编译器 — “执行器”,由红石激活以按顺序运行代码
8 种内置指令(映射到书写台 GUI 中的 8 个槽位)
· 聊天(煤炭)— 向距离编译器 10 格范围内的玩家发送消息
· 等待(铜锭)— 暂停执行指定秒数
· 模拟右键(铁锭)— 放置方块/与方块交互(按钮、拉杆、门、活板门、栅栏门、音符盒、中继器、比较器)
· 模拟左键(金锭)— 在相对坐标处破坏方块(配合工具可获得掉落物)
· 模拟手持(绿宝石)— 切换为“使用快捷栏物品”或“空手”模式
· 模拟伤害(钻石)— 攻击实体(生物/玩家/任意),支持武器伤害、附魔、暴击和火焰附加效果
· 跳转(石英)— 用于循环和分支的 goto 语句
· 条件判断(下界合金锭)— 带有安全表达式求值的条件逻辑(支持算术、比较、逻辑、字符串操作)
条件判断(SafeEval)内置变量
用 % 包裹变量名,例如 %variable%。
游戏内教程
· /codebox help — 帮助与反馈门户
· /codebox junior [章节] — 新手教程(第 0-6 章:从 Hello World 到攻击)
· /codebox senior [章节] — 进阶教程(第 0-4 章:跳转、条件判断、两个完整示例项目)
示例项目(包含在教程中)
· 自动健康监控 — 在循环中检查最近玩家的健康值,当低于 2 颗心时停止攻击
· 自动建造者 — 使用“模拟右键”在相对坐标处放置方块并建造火箭模型
为何下载
- 独特玩法 — 极少数 Slimefun 插件能将编程转化为可视化的游戏内体验。结合了红石、自动化和编程逻辑——非常适合红石工程师、自动化爱好者以及希望学习编程概念的玩家。
- 纯粹的游戏内体验 — 完全在服务器端进行编写、运行和调试。无需任何外部工具,且教程对新手友好。
- 完整的内置教程 — 从零开始的逐步章节,以及两个可直接复制粘贴的示例项目。学习曲线平缓。
下载前须知
要求(硬性依赖)
· 服务器:Paper >= 1.19.2 (api-version: 1.19.2)
· 必需插件:Slimefun4 (RC-32) — 声明为 depend(缺少则无法运行)
· Java:16 或更高版本
限制与警告
· 作用范围 — 编译器的所有操作限制在 10 格半径的立方体内(聊天、攻击、点击、玩家检测)。
· 经验消耗 — 每编写一行代码需消耗 1 级经验值(每张代码纸)。编写前请储备足够的经验。
· 无权限系统 — 目前暂无权限管理;任何玩家均可使用编译器。由于它可以攻击玩家和破坏方块,请在公共服务器上谨慎使用。作者明确警告用户务必小心。
· 基岩默认不可破坏 — BedrockBreak 默认为 false;服务器管理员必须在 config.yml 中启用它。
· 暴击率可配置 — crit-chance 默认为 50(0-100),模拟原版下落攻击暴击。
· 攻击目标列表可配置 — 生物模式的实体类型可在 config.yml 下的 options.mob 中进行调整。
· 编译器槽位 1 = “快捷栏” — 在此放置镐子(用于掉落)、剑(用于攻击)或方块(用于放置)。代码纸仅在槽位 2 及之后生效。
反馈渠道
· 邮箱:YXY317Coder@qq.com
· QQ 群:729416878
· GitHub Issues:
CodeBox · 317
CodeBox
Write code in Minecraft with this Slimefun addon
A Slimefun4 addon for Paper 26.2 servers. Build a visual programming system using "Code Paper + Writer + Compiler" in-game, and run your programs with a redstone signal.
What This Project Does
CodeBox is a Slimefun4 addon that lets you write and run programs using in-game items on a survival server. No external tools needed — everything happens inside Minecraft.
Three Core Items (all in the "Easy Programming" category, crafted via Enhanced Workbench)
· Code Paper — The program "carrier," each paper holds one line of code
· Writer — A graphical interface to write instructions onto Code Paper
· Compiler — The "executor," activated by redstone to run code sequentially
8 Built-in Instructions (mapped to 8 slots in the Writer GUI)
· Chat (Coal) — Send messages to players within 10 blocks of the Compiler
· Wait (Copper Ingot) — Pause execution for a specified number of seconds
· Simulate Right-Click (Iron Ingot) — Place blocks / interact with blocks (buttons, levers, doors, trapdoors, fence gates, note blocks, repeaters, comparators)
· Simulate Left-Click (Gold Ingot) — Break blocks at relative coordinates (works with tools for drops)
· Simulate Hand (Emerald) — Switch between "use hotbar item" or "empty hand" mode
· Simulate Damage (Diamond) — Attack entities (mob/player/any), supports weapon damage, enchantments, critical hits, and fire aspect
· Jump To (Quartz) — goto for loops and branches
· If (Netherite Ingot) — Conditional logic with safe expression evaluation (arithmetic, comparison, logic, string operations)
Conditional (SafeEval) Built-in Variables
Wrap variable names with %, e.g. %variable%.
In-Game Tutorials
· /codebox help — Help and feedback portal
· /codebox junior [chapter] — Beginner tutorial (Chapters 0-6: from Hello World to attacking)
· /codebox senior [chapter] — Advanced tutorial (Chapters 0-4: jumps, conditionals, two complete example projects)
Example Projects (included in tutorials)
· Auto Health Monitor — Check the nearest player's health in a loop, stop attacking when below 2 hearts
· Auto Builder — Use "Simulate Right-Click" to place blocks at relative coordinates and build a rocket model
Why Download
- Unique Gameplay — Very few Slimefun addons turn programming into a visual in-game experience. Combines redstone, automation, and programming logic — great for redstone engineers, automation fans, and players wanting to learn coding concepts.
- Pure In-Game Experience — Write, run, and debug entirely on the server. Zero external tools required, and the tutorials make it beginner-friendly.
- Complete Built-in Tutorials — Step-by-step chapters from scratch, plus two copy-paste-ready example projects. Low learning curve.
Essential Info Before Downloading
Requirements (Hard Dependencies)
· Server: Paper >= 1.19.2 (api-version: 1.19.2)
· Required Plugin: Slimefun4 (RC-32) — declared as depend (won't run without it)
· Java: 16 or higher
Limitations & Warnings
· Scope — All Compiler actions are limited to a 10-block radius cube (chat, attacks, clicks, player detection).
· XP Cost — Each line written costs 1 XP level (per Code Paper). Stock up on experience before writing.
· No Permission System — Currently no permission management; any player can use the Compiler. Since it can attack players and break blocks, use with caution on public servers. The author explicitly warns users to be careful.
· Bedrock Unbreakable by Default — BedrockBreak defaults to false; server owners must enable it in config.yml.
· Crit Rate Configurable — crit-chance defaults to 50 (0-100), simulating vanilla fall-attack criticals.
· Attack Target List Configurable — Entity types for mob mode can be adjusted in config.yml under options.mob.
· Compiler Slot 1 = "Toolbar" — Place pickaxes (for drops), swords (for attacks), or blocks (for placement) here. Code Paper only works in slot 2 and beyond.
Feedback Channels
· Email: YXY317Coder@qq.com
· QQ Group: 729416878
· GitHub Issues:
CodeBox · 317
评论 0
登录后参与评分
还没有评论,来抢沙发吧