跳到正文

KubeX

作者:wheedo07

Development toolkit for KubeJS with dedicated workspaces, Rhino compatibility and source-level debugging.

收藏

介绍

中文介绍正在准备中,下面暂时显示原文。

KubeX

KubeX is a development workspace for KubeJS.

It keeps your source code in kubex/, builds it with esbuild, converts the output for Rhino/KubeJS, and synchronizes the final files into kubejs/.

Features

  • JavaScript and TypeScript workspace setup
  • /kubex init js and /kubex init ts
  • /kubex build runs npm install when needed, then npm run build
  • /kubex sync publishes scripts, assets, data, and config to KubeJS
  • Rhino compatibility post-processing
  • Source map support and /kubex doctor
  • Debug mode for callback errors
  • Optional rebuild and sync when the game server starts
  • /kubex export creates a standalone KubeJS mod JAR

ProbeJS

KubeX works with ProbeJS.

ProbeJS handles typings and editor metadata. KubeX copies .probe, .vscode, and jsconfig.json into the workspace when available, then handles the build and runtime workflow.

Export

/kubex export packages the compiled workspace as a separate mod.

The exported JAR requires KubeJS, but does not require KubeX. It includes processed KubeJS scripts, assets, data, and a small plugin that loads the scripts from the JAR.

Requirements

  • KubeJS
  • Node.js for workspace builds

Commands

/kubex init js
/kubex init ts
/kubex build
/kubex sync
/kubex export
/kubex debug on
/kubex debug off
/kubex doctor <group> <line> [column]

常见问题

KubeX 支持哪些 Minecraft 版本?

KubeX 支持 Minecraft Java 版 1.21.1,可用的加载器:NeoForge。下载时注意选择和你游戏版本一致的文件。

KubeX 怎么安装?

先用 PCL2 或 HMCL 启动器安装对应版本的 NeoForge,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。运行环境:客户端 / 服务端。

评论

登录后评论和评分