Attach Rope (Bi-Entity Action Type)

Attaches a rope between the actor and the target.

Attaches a rope between the actor and the target. This is the same action as apoli:attach_rope in the entity context, registered again here so an endpoint can use "source": "target".

Type ID: apoli:attach_rope

Fields

FieldTypeDefaultDescription
fromRope Endpoint{ "source": "self" }One end of the rope. self is the actor.
toRope Endpoint{ "source": "raycast", "blocks": true }The other end. Use { "source": "target" } for the entity this action was run against.
slotStringoptionalA label for this rope. Attaching again with the same slot replaces the previous rope in it.
textureIdentifierapoli:textures/rope/rope.pngThe texture the rope is drawn with.
toggleBooleantrueWhen true and no slot is given, re-firing while the actor already holds a controllable rope releases it instead of adding another.
controllableBooleantrueWhether the built-in reel/swing keys drive this rope for its owner. Set false for tethers you cast on other entities.
modeString"leash"leash, spring or rigid — see the entity action page.
break_beyondFloat0.0Snap the rope once its ends are farther apart than this many blocks. 0 never breaks.
min_lengthFloat1.0Shortest the rope can reel to.
max_lengthFloat30.0Longest the rope can be.
start_lengthFloatsee belowThe length the rope is created at, clamped to min_lengthmax_length. Left out, a controllable rope starts taut at the current distance between its ends, and a rope that is not controllable starts at max_length.
stiffnessFloat0.1How hard the rope yanks an end back once it passes its length. Range 0.01.0.
radial_dampingFloat0.85How much outward speed is bled off at the length limit. Range 0.01.0; it is a damping factor, so above 1.0 it would amplify instead.
spring_scalingFloat0.65Extra softening while swinging inward. Range 0.01.0.
swing_boostFloat1.08Speed multiplier applied to a sprinting player’s swing. Range 0.02.0.
max_swing_speedFloat0.7Cap on the sprint swing boost.
control_accelFloat0.08How hard the WASD swing keys push a controllable rope.
reel_stepFloat0.2Blocks per tick the length changes while a reel key is held.
slack_pull_rateFloat5.0Multiplier applied to reeling in while there is slack.
constrain_fromBooleantrueWhether the physics may pull the from end.
constrain_toBooleantrueWhether the physics may pull the to end.

The physics fields are clamped to a stable range at load time, and a value outside it is clamped with a warning naming the field. stiffness, radial_damping and spring_scaling must be 0.01.0; swing_boost must be 0.02.0. Above those, the per-tick spring integrator diverges instead of settling: radial_damping above 1.0 multiplies outward speed every tick, and stiffness above 1.0 overshoots further each correction — which is what threw players hundreds of blocks. The rope also refuses to apply more than 4 blocks/tick of correction, so no combination of settings can launch an endpoint across the world.

Physics settings are captured when the rope is cast. Editing them and reloading the data pack does not change ropes that already exist — re-cast the rope to pick up new values.

Example

{
  "type": "apoli:attach_rope",
  "to": { "source": "target" },
  "slot": "whip",
  "controllable": false,
  "max_length": 6,
  "break_beyond": 14
}

A whip that hooks whatever you hit and drags it along within 6 blocks until the two of you are pulled 14 blocks apart. Because it is not controllable, it starts at its full 6-block length.