Overview
| Description | A mandatory component on every object (it cannot be removed). Position is the bottom-centre anchor, rotation is [yaw, pitch, roll] in degrees, plus scale. An empty object has only a Transform and is not shown in the scene. While a Minecraft block component is attached, the Transform snaps to cells, 90° steps and scale 1; display and model looks allow free position, rotation and scale. |
|---|---|
| Status | Available |
Nodes
| Node | Pins | Notes |
|---|---|---|
Object positionobj.pos | object → pos | |
Transform valuesobj.transform | object → pos · yaw · pitch · scale | |
Move objectobj.moveTo | object · pos · seconds | Moves over the given time (0 = instantly). Child objects move along. |
Rotate objectobj.rotateTo | object · yaw · pitch · seconds | Block objects: 90° yaw steps |
Scale objectobj.scaleTo | object · scale | Display objects only |
Nodes and the Java code below do the same thing. Each node corresponds to one Java method.
Java
Current API — Nodes static methods used by the node editor Java view and Java components
// Raise the door 3 blocks over 2 seconds
Nodes.Pos p = Nodes.objPos(this, "door");
Nodes.objMoveTo(this, "door", new Nodes.Pos(p.x(), p.y() + 3, p.z()), 2);
Nodes.objRotateTo(this, "door", 90, 0, 1);Upcoming API (crux.engine) — A package that combines editor Java components and the plugin Crux API. Names and signatures may change before release.
import crux.engine.*;
public class Door extends Component {
@Field public double height = 3;
@Override public void onInteract(Player player) {
Transform t = gameObject().transform();
t.moveTo(t.position().add(0, height, 0), 2.0); // seconds
t.rotateTo(90, 0, 1.0);
}
}In game
| Player | What they see |
|---|---|
| Vanilla client | Block objects appear as real blocks on every version, moving one block at a time and rotating in 90° steps. Facing of stairs, doors and similar blocks turns with them. |
| With the server resource pack | Same as vanilla. No resource pack is required. |
| Crux client | Same as vanilla. For objects with a Crux model, the Crux client also draws the model. |
Supported versions · server software
| Target | Method |
|---|---|
| Block objects — 1.12.2 to 26.3 (Paper, Fabric) | One-block moves and 90° turns, identical on every version |
| Display objects | Free movement, rotation (including roll) and scale — see the Display page. |
| Forge · NeoForge servers | The editor server component is not supported yet. |
Where to configure
| Server window (operation) | Not applicable — created in the editor. |
|---|---|
| Crux Editor (creation) | Transform section at the top of the Inspector (position, size, rotation; drag to change values) · scene gizmos (move, rotate, scale) · nodes |
Planned
- Tilted rotation for physics forms (yaw only for now)
Transform rules
- pos is the bottom centre of the object. For a single block, x and z are at the cell centre (.5) and y at the cell floor.
- rot is [yaw, pitch, roll] in degrees. With a Minecraft block attached, only 90° yaw steps.
- Missing values are filled by the server: position (0, 0, 0), rotation (0, 0, 0), scale (1, 1, 1).
- Cell ranges (block objects, sensor boxes) are computed from the Transform and the Minecraft block size or collider boxes.
- Whatever moves the parent, children and grandchildren move and rotate with it. Changing the parent while running: node obj.setParent.
- The order under one parent is changed by dragging objects before or after others in the hierarchy.
CRUX