Create_GantryShaft

A gantry shaft — the rail along which a gantry carriage slides. The natural place to wire kinetic input and the natural primary peripheral for the gantry system: control speed and direction here, observe rail topology (length, this shaft's position, where the carriage is) by walking adjacent shafts.

Driving programmatically goes via an upstream Create_SequencedGearshift's move(distance), just like for pistons.

getPart()Get this shaft's role in the rail.
getAxis()Get the rail's axis.
isPowered()Check whether this shaft is currently powered (redstone).
getMovementSpeed()Get the linear speed at which a carriage on this rail will move.
canAssembleOn()Check whether a carriage may currently move along this shaft.
getRailLength()Get the total length of the rail this shaft is part of (number of contiguous shaft blocks along the rail axis).
getRailIndex()Get this shaft's index along the rail, counted from the start end.
getCarriagePosition()Get the carriage's index along the rail, or nil if no carriage is attached.
hasCarriage()Check whether a carriage is currently attached to this rail.
getCarriageId()Get the id of the carriage block attached to this rail, or nil if none is found.
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.
getPart()Source

Get this shaft's role in the rail. One of start, middle, end, single.

Returns

  1. string The part string.
getAxis()Source

Get the rail's axis.

Returns

  1. string The axis as "x", "y", or "z".
isPowered()Source

Check whether this shaft is currently powered (redstone). Powering any shaft in the rail inverts the carriage's direction of travel.

Returns

  1. boolean True if powered.
getMovementSpeed()Source

Get the linear speed at which a carriage on this rail will move. Signed: positive moves the carriage along the rail's facing direction, negative moves it opposite. Factors in the redstone-inverted direction (so a powered shaft with positive kinetic input gives a negative movement speed). 0 when stalled or unpowered.

Returns

  1. number The movement speed in blocks per tick.
canAssembleOn()Source

Check whether a carriage may currently move along this shaft.

Returns

  1. boolean True if assembly conditions are met.
getRailLength()Source

Get the total length of the rail this shaft is part of (number of contiguous shaft blocks along the rail axis).

Returns

  1. number The rail length in blocks.
getRailIndex()Source

Get this shaft's index along the rail, counted from the start end. The start shaft is index 0; the end shaft is getRailLength() - 1.

Returns

  1. number The 0-based index.
getCarriagePosition()Source

Get the carriage's index along the rail, or nil if no carriage is attached. Same units as getRailIndex — 0 at the start end, getRailLength() - 1 at the end.

Returns

  1. number The carriage's rail index, or nil.
hasCarriage()Source

Check whether a carriage is currently attached to this rail.

Returns

  1. boolean True if a carriage is found.
getCarriageId()Source

Get the id of the carriage block attached to this rail, or nil if none is found. Same opaque-token flavor as getSelfId on a peripheral wrapping the carriage.

Returns

  1. string The carriage's id, or nil.
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.