Visual programming for KubeJS.
KubeBlocks is a block-based visual programming environment for Minecraft modding with KubeJS, built using Blockly.
Instead of writing JavaScript manually, KubeBlocks allows you to create KubeJS scripts by connecting visual blocks.
The visual editor is powered by Blockly, while KubeBlocks provides the KubeJS-specific block system, type integration, code generation, and development workflow on top of it.
The goal is not just to provide a simple beginner-oriented scripting tool. KubeBlocks aims to make it possible to build complete and complex KubeJS projects visually, while still providing access to the APIs and features available in KubeJS.
KubeBlocks requires the following components:
- KubeJS
- KubeX
- Node.js
KubeBlocks uses KubeX as its build and development backend.
KubeX handles the JavaScript/TypeScript build pipeline used by KubeBlocks, and therefore Node.js must be installed on the system running the Minecraft server or client.
Make sure Node.js and npm are available from the system PATH.
You can verify the installation with:
node --version
npm --versionIf these commands are not available, KubeX will not be able to build KubeBlocks projects.
KubeBlocks
V
Blockly Visual Editor
V
Visual Blocks
V
JavaScript / TypeScript
V
KubeX
V
Node.js Build Pipeline
V
KubeJS
V
Minecraft
KubeBlocks is responsible for the visual programming environment and code generation.
The visual editor is built on Blockly, which provides the underlying block-based editor and workspace.
KubeX provides the development workspace and build system, while Node.js runs the tools required during the build process.
KubeBlocks is designed around KubeJS rather than introducing a completely separate scripting runtime.
Projects can work with the standard KubeJS script structure:
kubejs/
├── client_scripts/
├── server_scripts/
├── startup_scripts/
├── assets/
└── data/
Generated scripts are converted into code that can be executed by KubeJS.
This means KubeBlocks projects can coexist with regular KubeJS scripts and resources.
KubeBlocks aims to use ProbeJS type information to understand the APIs available in the current modpack.
This makes it possible to expose not only standard Minecraft and KubeJS APIs, but also APIs provided by other mods.
Minecraft / Mods
V
ProbeJS
V
Type Metadata
V
KubeBlocks
V
Generated Blocks
The long-term goal is to avoid manually implementing blocks for every supported mod.
One of the main goals of KubeBlocks is making APIs from other Minecraft mods accessible through visual programming.
Instead of maintaining a fixed list of integrations, KubeBlocks aims to discover usable APIs through type metadata provided by tools such as ProbeJS.
The available blocks can therefore depend on the mods installed in the current Minecraft environment.
KubeBlocks focuses on:
- Making KubeJS accessible without requiring JavaScript knowledge
- Providing a Blockly-based visual programming environment
- Supporting large visual scripting projects
- Providing useful type information while editing
- Integrating APIs from other mods
- Generating KubeJS-compatible code
- Working with the Node.js/npm ecosystem through KubeX
- Allowing advanced projects to be built visually
The goal is to make visual programming a full KubeJS development workflow rather than only a teaching tool.
