Create_MechanicalBearing

A mechanical bearing — Create's contraption assembler. Exposes the same surface the player has via right-click empty hand (assemble/disassemble), the rotation mode they can scroll on the bearing, and read-only state visible through goggles.

Like its Avionics counterparts propeller_bearing (Aero) and swivel_bearing (Sim), the bearing's rotation is integrated from kinetic input — neither the player nor scripts can set it directly.

isAssembled()Check whether the bearing has assembled a contraption.
assemble()Assemble the bearing's contraption.
disassemble()Disassemble the bearing's contraption.
getAngle()Get the bearing's current visual angle, in degrees.
getAngleRad()Get the bearing's current visual angle, in radians.
getAngularSpeed()Get the bearing's angular speed (degrees per tick × 20 ≈ deg/s).
isNearInitialAngle()Check whether the bearing is near its initial (start) angle.
getRotationMode()Get the bearing's rotation mode — what happens to the contraption when it stops rotating.
setRotationMode(mode)Set the bearing's rotation mode.
isWoodenTop()Check whether the bearing has a wooden top variant.
getLastAssemblyError()Get the last assembly error message, or nil if the last assembly attempt succeeded or no attempt has been made.
getContraption()Get everything known about the assembled contraption in one read: whether it's stalled, its current velocity (world-fram...
size()Get the number of slots in the contraption's combined inventory — every mounted chest, barrel, depot, etc.
list()List every non-empty slot in the contraption's combined inventory.
getItemDetail(slot)Get the item in a specific slot of the contraption's combined inventory.
getItemLimit(slot)Get the maximum number of items a slot in the contraption's combined inventory can hold.
tanks()List every tank in the contraption's combined fluid storage.
getSelfId()Get this block's id.
getSourceId()Get the id of the block immediately driving this one, or nil if this block has no source.
getSubnetworkAnchorId()Get the id of this block's speed-zone anchor — the gearshift / clutch / speed controller / generator that defines the start of this speed zone.
getNetworkId()Get the id of this block's kinetic network.
getKind()Get this block's role on the kinetic graph: one of "generator", "split_shaft", "consumer", or "passthrough".
getSpeed()Get the local rotational speed at this block.
hasSource()Check whether this block is connected to a kinetic source.
isOverstressed()Check whether the block's network is overstressed.
getStressImpact()Get the stress impact of this block on its network — how much stress it draws while running.
getStressContribution()Get this block's contribution to its network's stress capacity.
isAssembled()Source

Check whether the bearing has assembled a contraption.

Returns

  1. boolean True if running.
assemble()Source

Assemble the bearing's contraption. Equivalent to a player right-clicking the bearing with an empty hand while it's not running. No-op if already assembled.

disassemble()Source

Disassemble the bearing's contraption.

getAngle()Source

Get the bearing's current visual angle, in degrees.

Returns

  1. number The angle in degrees (interpolated to current tick).
getAngleRad()Source

Get the bearing's current visual angle, in radians.

Returns

  1. number The angle in radians.
getAngularSpeed()Source

Get the bearing's angular speed (degrees per tick × 20 ≈ deg/s). Matches the value goggles show for any kinetic block.

Returns

  1. number The angular speed.
isNearInitialAngle()Source

Check whether the bearing is near its initial (start) angle. Used by the bearing internally to decide when to place blocks back on disassembly under rotate_place_returned; useful for scripts that want to wait for the contraption to return home before stopping.

Returns

  1. boolean True if within the bearing's "near initial" tolerance.
getRotationMode()Source

Get the bearing's rotation mode — what happens to the contraption when it stops rotating.

One of:

  • rotate_place — rotate freely, place blocks back on stop
  • rotate_place_returned — rotate freely, place blocks back only when stopped near the initial angle
  • rotate_never_place — rotate freely, never place blocks back (contraption persists as an entity)

Returns

  1. string The mode string.
setRotationMode(mode)Source

Set the bearing's rotation mode. Matches the in-game scroll option on the bearing.

Parameters

  1. mode string rotate_place, rotate_place_returned, or rotate_never_place.
isWoodenTop()Source

Check whether the bearing has a wooden top variant.

Returns

  1. boolean True if wooden-top (e.g. windmill bearing).
getLastAssemblyError()Source

Get the last assembly error message, or nil if the last assembly attempt succeeded or no attempt has been made. Same text the goggles show on a bearing whose last assembly failed.

Returns

  1. string The error message, or nil.
getContraption()Source

Get everything known about the assembled contraption in one read: whether it's stalled, its current velocity (world-frame blocks/tick — a rate of change, not a location, so it's exempt from the local-only rule below), block count, seat count, hasBlockBreakers (can it destroy blocks in its path, e.g. a saw in cutting mode — relevant context for a stall: is it expected to grind through an obstacle or just sit blocked by one), local bounding box, the local position (an offset from the contraption's own anchor, not a world coordinate) and block id of every block making it up, its active mechanical implements (actors — drills, saws, harvesters, deployers, mechanical arms, mixers, each with disabled/stalled), every seat with whoever's riding it (seats), every entity being carried along without a seat — standing on an elevator cabin, walking a moving platform (riders) — every block supporting right-click interaction while riding (interactors), the actor types currently switched off via the Contraption Controls filter (disabledActorTypes), and mounted-storage counts. Both seats and riders are anonymous by design: an occupant is only isPlayer and its entity type, never a name or UUID.

Anything mounted so it protrudes in the contraption's own direction of travel — a drill facing fore or aft on a gantry carriage, say — will collide with whatever it's moving past on every block of motion, not just once. That reads as a stall repeating at a regular position interval rather than a single jam. On a gantry shaft, Create_GantryShaft.getAxis names that travel axis and shares this method's local coordinate frame exactly, so a block/actor position with only that axis nonzero is the one to suspect.

Returns

  1. any... The contraption table, or nil plus a reason.
size()Source

Get the number of slots in the contraption's combined inventory — every mounted chest, barrel, depot, etc. summed together. 0 when unassembled.

Returns

  1. number The slot count.
list()Source

List every non-empty slot in the contraption's combined inventory. Empty when unassembled.

Returns

  1. { [number] = { [string] = any } } A map of slot to item detail.
getItemDetail(slot)Source

Get the item in a specific slot of the contraption's combined inventory.

Parameters

  1. slot number The slot to inspect.

Returns

  1. { [string] = any } The item detail, or nil if empty.
getItemLimit(slot)Source

Get the maximum number of items a slot in the contraption's combined inventory can hold.

Parameters

  1. slot number The slot to inspect.

Returns

  1. number The item limit.
tanks()Source

List every tank in the contraption's combined fluid storage. Empty when unassembled.

Returns

  1. { [number] = { [string] = any } } A map of tank index to fluid detail.
getSelfId()Source

Get this block's id. Other peripherals' getSourceId or getSubnetworkAnchorId return this same id when they refer to this block.

Returns

  1. string The block's id.
getSourceId()Source

Get the id of the block immediately driving this one, or nil if this block has no source.

Returns

  1. string The parent's id, or nil.
getSubnetworkAnchorId()Source

Get the id of this block's speed-zone anchor — the gearshift / clutch / speed controller / generator that defines the start of this speed zone. Two blocks share an anchor iff they're in the same speed zone. A generator or split-shaft returns its own getSelfId.

Returns

  1. string The anchor block's id, or nil.
getNetworkId()Source

Get the id of this block's kinetic network. Same value for every block on the same network regardless of how many speed zones lie between them. Nil if this block isn't on a network.

Returns

  1. string The network id, or nil.
getKind()Source

Get this block's role on the kinetic graph: one of "generator", "split_shaft", "consumer", or "passthrough".

Returns

  1. string The role string.
getSpeed()Source

Get the local rotational speed at this block. Signed; same value across a speed zone, changes across a split-shaft.

Returns

  1. number The local speed.
hasSource()Source

Check whether this block is connected to a kinetic source.

Returns

  1. boolean True if a source is connected.
isOverstressed()Source

Check whether the block's network is overstressed.

Returns

  1. boolean True if overstressed.
getStressImpact()Source

Get the stress impact of this block on its network — how much stress it draws while running. Speed-dependent; zero for sources and pure conduit blocks. Matches the "Stress Impact" value shown by goggles.

Returns

  1. number The stress impact.
getStressContribution()Source

Get this block's contribution to its network's stress capacity. Non-zero for sources only. Parallel to getStressImpact (per-block draw) and distinct from Create_Stressometer#getStressCapacity, which reports the network total.

Returns

  1. number The per-block stress contribution.