CRUX

Collision · sensing · raycast · clicks

Overview

DescriptionCollisions (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.
StatusAvailable

Nodes

NodePinsNotes
On collision
ev.obj.collide
object · other · otherKind · otherObject · otherPlayer · otherEntity · speed · point · normal · impulse · blockSpeed in blocks per second
While touching
ev.obj.collideStay
object · other · otherKind · otherObject · otherPlayer · otherEntity · point · normal · impulse
On separation
ev.obj.collideExit
object · other · otherKind · otherObject · otherPlayer · otherEntity
On trigger enter
ev.obj.triggerEnter
object · other · otherKind · otherObject · otherPlayer · otherEntity
While in trigger
ev.obj.triggerStay
seconds → object · other · otherKind · otherObject · otherPlayer · otherEntitySeconds 0 = every 4 ticks; above 0 = every that many seconds
On trigger exit
ev.obj.triggerExit
object · other · otherKind · otherObject · otherPlayer · otherEntity
Enters area
ev.area.enter
area · who · kind · tag → player · entity · objectWho: player, entity, type, tag, item, projectile, object, prefab
Raycast
game.raycast
pos · dir · distance → hit · pos · block · body · entityHits every blocking collider, including static objects
On click
ev.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

PlayerWhat they see
Vanilla clientSensing, 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 packSame as vanilla.
Crux clientSame as vanilla.

Supported versions · server software

TargetMethod
Sensing, collisions, raycasts1.12.2 to 26.3, identical on Paper and Fabric
Click hitboxesInteraction entities on 1.19.4+, invisible armour stands before; every driver resolves by entity UUID
Forge · NeoForge serversThe editor server component is not supported
Mob checks in sensorsEntities 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

PinValue
otherKindKind of the other party: object, player, entity, block (empty when none)
otherObject · otherPlayer · otherEntitySet only for that kind, empty otherwise
otherId 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-docs · client 0.3.25 · plugin 1.4.0 · mc 26.3 · updated 2026-10-11 · report a mistake