CRUX

Nodes ↔ Java · where code runs

Where it runs · review

LevelRuns onReviewPlayer install
Nodes (graphs, functions)ServerNone — server owner's responsibilityNone
Java componentsServer (compiled and hot-reloaded on save, no JDK needed)None — same as server plugins. Only when shared via market or packagesNone
Client mods (jar)Player PCs (mod servers only)When listing on public servers (Lapis+ · open source)Automatic via GitHub release URL + sha256
Hosting (later)Crux hostingIsolation and resource limits instead of review—

No extra scripting language (such as Lua) — just two levels, nodes and Java, to keep things clear. Start with nodes and continue with Export to Java.

Nodes → Java

  • The Java button in the node editor shows the same logic as Java alongside (read-only, follows your edits).
  • Export to Java turns it into a Java component file to continue in code. It is one way, and the original graph stays.
  • The // @node lines in generated code are node markers — keep them and the code reads back as nodes.

Java → nodes (mixed)

Right-click a Java file in the Project window and choose View as nodes. The forms below become nodes; everything else becomes an unrecognized node (grey, dashed) that keeps the original code. Edit recognized nodes and Apply: only those parts are regenerated and unrecognized code is put back as-is — Java stays the source of truth and behaviour does not change.

Recognized formNode
Nodes.message(this, player, "hi");That node (Crux API call — the definition's method)
v = Nodes.gameSpawn(this, "minecraft:zombie", pos);Node, with the result kept as a value (later uses become value links)
if (Nodes.condChance(this, 50)) { … } else { … }Condition node with true/false branches
if (식) { … }Branch (if)
for (Object x : list) · for (int i = 0; i < n; i++) · while (식)For each · Repeat · While
Nodes.later(this, 2, () -> { … });Wait
Nodes.mathAdd(a, b) expressionsPure nodes (value links)
"글" · 12 · trueNode field values
// @node id 종류 x,yKeeps that id and position
  • Not recognized: local variable declarations, calls to other methods, try/catch, lambdas (other than later), your own classes — such lines stay as unrecognized nodes; edit them in the IDE (double-click opens it).
  • Other fields and methods of the class are left untouched.
  • Click the bar "M of N nodes were not recognized" to jump to them.

Event nodes ↔ Java hooks

Event nodeJava (CruxComponent)
ev.start · ev.tick · ev.destroy · ev.enable · ev.disableonStart · onTick · onDestroy · onEnable · onDisable
ev.click · ev.redstoneonInteract(player) · onRedstone(power)
ev.obj.collide · collideStay · collideExitonCollide(Collision) · onCollideStay(Collision) · onCollideExit(other)
ev.obj.triggerEnter · triggerStay · triggerExitonTriggerEnter(other) · onTriggerStay(other) · onTriggerExit(other)
Driver events (break, place, use, damage, chat…)onEvent(Nodes.Event e)
Object and feature events (signal, sleep, wake, world enter/leave, step, timer, animation, UI, key, quest, command, state, item use, effect hit)onEvent(Nodes.Event e) + field filters
  • Generated onEvent code applies the event fields (key, state, name, timer seconds, only on this object, graph instead of vanilla) with the same conditions. A nodes → Java → nodes round trip gives identical code.
  • Events without a Java hook: area events (onTrigger · onLeave only for this object box and players) and skills (skill graph files only).

Code summary · external IDE

  • Code summary on the Java component card: file name, line count, events handled and methods usable as nodes (@Node). The body is not expanded into nodes.
  • Open in external IDE creates VS Code (.vscode/settings.json) and IntelliJ (.iml, .idea) projects in the component folder linked to the editor jar (autocomplete). Opens VS Code when installed, otherwise the folder.
  • Saving in an external IDE is detected by the editor, compiled on the server and reloaded.

crux-docs · client 0.3.25 · plugin 1.4.0 · mc 26.3 · updated 2026-10-11 · report a mistake