promotional bannermobile promotional banner

KubeJS Visual Editor

Visual editor for KubeJS with support for most popular tech mods.

KubeJS Visual Editor Usage Guide

Author: LiangYing_FX
Minecraft 1.21.1 · NeoForge 21.1.x

Currently in the development phase; Vanilla and MEK should work as expected.
Made by DeepSeek.


What is this

An in-game visual recipe editor for KubeJS. Pick a mod, pick a recipe type, fill in the items, watch the script generate live, then write it into kubejs/server_scripts/. It can also register custom items with your own PNG texture.


Installation

  1. Install NeoForge 1.21.1 and KubeJS 2101.x

  2. Drop kubejs-editor-0.1.0.jar into mods/

  3. Install the matching KubeJS addon for the mod you want to edit (e.g. KubeJS-Mekanism for Mekanism)

  4. Launch the game

Mods without their addon are marked with * in the list.


Opening the editor

Press K by default. Rebind it in Options → Controls → Key Binds.


Workflow

  1. Pick a mod on the left, a recipe type in the middle

  2. Fill the fields on the right; fields with ... open the item picker (search by id or name)

  3. You can also drag ingredients straight from JEI onto a field or a crafting slot

  4. The preview below updates live

  5. Use "Add to Queue" to collect several entries, or hit "Save All"

  6. Run /reload in game


Crafting grid

Shaped recipes use a 3×3 grid plus an output slot. The pattern is derived automatically: identical items share a letter, empty cells become spaces. Right-click a cell to clear it.


Where files go

One folder per mod, one file per recipe type, so a broken file only affects itself. Saving is a merge: the existing file is parsed back, duplicates are skipped, then rewritten. Nothing gets wiped.

text
kubejs/server_scripts/visual/mekanism/crushing.js
kubejs/server_scripts/visual/create/mixing.js
kubejs/server_scripts/visual/minecraft/shaped.js
kubejs/server_scripts/visual/removals.js      ← all removals are collected here

Removing recipes

Pick the recipe type, fill the input item, press "Delete Recipe" and save. It emits event.remove({ type: '...', input: '...' }) into visual/removals.js.


Registering items

  1. Press "New Item" at the top

  2. Fill namespace, item name, display name

  3. Drop a PNG into kubejs_editor/imports/, then pick it with "Pick PNG"

  4. Saving writes kubejs/startup_scripts/editor_items.js and copies the image to kubejs/assets/<ns>/textures/item/<name>.png

  5. Restart the game — startup scripts are not reloaded by /reload

The client runs headless, so there is no system file dialog; textures are picked from a folder.


Changes panel

"Changes" at the bottom-left lists every modified script, including hand-written ones. All of them have a delete × on the right. Text-range deletion keeps your comments and formatting intact. There is a search box at the top.

 
 
Color Source Deletable
Green Generated by this mod ✓
Blue Your hand-written scripts ✓ (deletes only that text range, keeps comments and formatting)
Yellow Registered items ✓
Grey Calls we cannot model (event.custom etc.) ✓

Supported mods

12 groups, 86 recipe types: Vanilla, Mekanism, Create, AE2, Modern Industrialization, Evolved Mekanism, Mekanism Sun, MekMM, Occultism, EnderIO, Powah, Oritech.


Adding your own mods

Drop JSON into config/kubejs_editor/, ship resources/kubejs_editor/recipes.json inside another mod, or call KubeJSEditorApi from a KubeJS script. See README for the format. Always name files after the English id, never the translated UI label.


Troubleshooting

Recipe does nothing

  • Is the matching KubeJS addon installed?

  • Check logs/latest.log for Unknown recipe type

  • Run /reload and watch the chat for errors

JEI panel missing

  • JEI must be installed and not covered by another screen

  • The first time you open the editor it may not show; open the item picker once and go back to refresh

UI is English

  • Follows the game language; both zh_cn and en_us are provided


KubeJS Visual Editor 使用说明

作者: LiangYing_FX
Minecraft 1.21.1 · NeoForge 21.1.x

目前正在开发阶段,原版以及 MEK 应该可以正常使用。
由 deepseek 制作。


这是什么

游戏内的 KubeJS 可视化配方编辑器。不用手写 JS,选模组、选配方类型、填物品,实时生成脚本并写入 kubejs/server_scripts/。还能注册自定义物品(带本地贴图)。


安装

  1. 安装 NeoForge 1.21.1 和 KubeJS 2101.x

  2. 把 kubejs-editor-0.1.0.jar 放进 mods/

  3. 想编辑哪个模组的配方,就装对应的 KubeJS 附属(例如 Mekanism 需要 KubeJS-Mekanism)

  4. 启动游戏

没装附属时,对应模组在列表里会带 *。


打开界面

默认按 K。可在「选项 → 控制 → 按键绑定」里改。


工作流

  1. 左列选模组,中列选配方类型

  2. 右侧填参数;带 ... 的字段可以打开物品选择器(搜索 ID 或名称)

  3. 也可以直接从 JEI 把物品拖到输入框或九宫格上

  4. 下方预览实时更新

  5. 点「加入队列」攒多条,或直接「保存全部」

  6. 游戏里 /reload 生效


工作台九宫格

有序合成是 3×3 网格 + 输出槽。图案由编辑器自动推导:相同物品自动共用字母,空格自动留空。右键格子清空。


保存到哪

按模组分文件夹、按配方类型分文件,一个文件坏了只影响它自己。保存是合并的:读已有文件、解析回配方、去重后重写。不会覆盖你之前保存的内容。

text
kubejs/server_scripts/visual/mekanism/crushing.js
kubejs/server_scripts/visual/create/mixing.js
kubejs/server_scripts/visual/minecraft/shaped.js
kubejs/server_scripts/visual/removals.js      ← 所有删除操作集中在这里

删除配方

选好配方类型,填上输入物品,点「删除配方」,再保存。会生成 event.remove({ type: '...', input: '...' }),全部集中到 visual/removals.js。


注册物品

  1. 顶部「注册物品」

  2. 填命名空间、物品名、显示名

  3. 把 PNG 放进 kubejs_editor/imports/,点「选择 PNG」从中挑

  4. 保存后会生成 kubejs/startup_scripts/editor_items.js,并把图片复制到 kubejs/assets/<ns>/textures/item/<name>.png

  5. 必须重启游戏,startup 脚本不走 /reload

客户端是 headless 的,系统文件对话框用不了,所以用目录选择。


已更改面板

左下角「已更改」,列出所有被改过的脚本——包括你手写的。右侧都有删除 ×。按文本范围删除时会保留注释和排版。顶部有搜索框,可按配方名、物品名、文件名过滤。

 
 
颜色 来源 可删
绿 编辑器生成的 ✓
蓝 你手写的脚本 ✓(只删那一段文本,保留注释和排版)
黄 注册的物品 ✓
灰 解析不了的调用(event.custom 等) ✓

支持哪些模组

内置 12 组、86 种配方类型:Vanilla、Mekanism、Create、AE2、Modern Industrialization、Evolved Mekanism、Mekanism Sun、MekMM、Occultism、EnderIO、Powah、Oritech。


加别的模组

把 JSON 放进 config/kubejs_editor/,或写进别的 mod 的 resources/kubejs_editor/recipes.json,或从 KubeJS 脚本调 KubeJSEditorApi。格式见 README。命名文件用英文 id,不要用界面上的翻译名。


常见问题

配方没生效

  • 对应模组的 KubeJS 附属装了吗?

  • 看 logs/latest.log 有没有 Unknown recipe type

  • 试 /reload 后看聊天栏是否报错

JEI 不显示

  • 需要 JEI 已安装且未被其他界面遮挡

  • 打开编辑器第一次可能不显示,进一次物品选择器再返回可刷新

界面是英文

  • 跟着游戏语言走;zh_cn 和 en_us 都有

KubeJS Visual Editor Team

profile avatar
  • 1
    Projects
  • 14
    Downloads