Overview
| Description | Collisions (Rigidbody), sensing (collider sensor boxes), raycasts and clicks as per-object events. The other party is identified by a kind (object, player, entity, block) and kind-specific pins. |
|---|---|
| Status | Available |
Nodes
| Node | Pins | Notes |
|---|---|---|
On collisionev.obj.collide | object · other · otherKind · otherObject · otherPlayer · otherEntity · speed · point · normal · impulse · block | Speed in blocks per second |
While touchingev.obj.collideStay | object · other · otherKind · otherObject · otherPlayer · otherEntity · point · normal · impulse | |
On separationev.obj.collideExit | object · other · otherKind · otherObject · otherPlayer · otherEntity | |
On trigger enterev.obj.triggerEnter | object · other · otherKind · otherObject · otherPlayer · otherEntity | |
While in triggerev.obj.triggerStay | seconds → object · other · otherKind · otherObject · otherPlayer · otherEntity | Seconds 0 = every 4 ticks; above 0 = every that many seconds |
On trigger exitev.obj.triggerExit | object · other · otherKind · otherObject · otherPlayer · otherEntity | |
Enters areaev.area.enter | area · who · kind · tag → player · entity · object | Who: player, entity, type, tag, item, projectile, object, prefab |
Raycastgame.raycast | pos · dir · distance → hit · pos · block · body · entity | Hits every blocking collider, including static objects |
On clickev.click | → player |
Nodes and the Java code below do the same thing. Each node corresponds to one Java method.
Java
Current API — Java component (CruxComponent) hooks · crux.engine.Collision
public class Gate extends CruxComponent {
@Override public void onTriggerEnter(String other) {
if ("player".equals(otherKind(other))) Nodes.message(this, other, "Passed");
}
@Override public void onCollide(crux.engine.Collision c) {
if (c.speed() > 6 && c.player() != null) Nodes.message(this, c.player(), "Hit");
}
}In game
| Player | What they see |
|---|---|
| Vanilla client | Sensing, collisions and raycasts are computed on the server, independent of the client. Click hitboxes use interaction entities from 1.19.4 and invisible armour stands before that. |
| With the server resource pack | Same as vanilla. |
| Crux client | Same as vanilla. |
Supported versions · server software
| Target | Method |
|---|---|
| Sensing, collisions, raycasts | 1.12.2 to 26.3, identical on Paper and Fabric |
| Click hitboxes | Interaction entities on 1.19.4+, invisible armour stands before; every driver resolves by entity UUID |
| Forge · NeoForge servers | The editor server component is not supported |
| Mob checks in sensors | Entities are checked for up to 32 sensor objects per pass; beyond that, players only |
Where to configure
| Server window (operation) | Not applicable. |
|---|---|
| Crux Editor (creation) | Collider component (turn off Auto; add trigger at the end of a box line) · event nodes · Java component hooks |
The "who" value
| Pin | Value |
|---|---|
otherKind | Kind of the other party: object, player, entity, block (empty when none) |
otherObject · otherPlayer · otherEntity | Set only for that kind, empty otherwise |
other | Id of the other party without its kind |
Java: CruxComponent.otherKind(other) · Collision.otherKind() · Collision.player() · Collision.entity() · Collision.gameObject().
Detection rules
- Sensor boxes: moving bodies, static objects and trigger command text all follow the same rules.
- Sensors and area events share the 4-tick pass and the same entity queries. Areas use cells (feet inside the cell); sensors use body-box overlap.
- Area stay seconds are counted in pass ticks.
- Limits: sensor box 4,096 blocks · area block events 4,096 cells · area entities 256 · 16 fires per pass.
CRUX