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
stringThe part string.
- getAxis()Source
Get the rail's axis.
Returns
stringThe 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
booleanTrue 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
numberThe movement speed in blocks per tick.
- canAssembleOn()Source
Check whether a carriage may currently move along this shaft.
Returns
booleanTrue 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
numberThe rail length in blocks.
- getRailIndex()Source
Get this shaft's index along the rail, counted from the
startend. Thestartshaft is index 0; theendshaft isgetRailLength() - 1.Returns
numberThe 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 thestartend,getRailLength() - 1at theend.Returns
numberThe carriage's rail index, or nil.
- hasCarriage()Source
Check whether a carriage is currently attached to this rail.
Returns
booleanTrue 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
getSelfIdon a peripheral wrapping the carriage.Returns
stringThe carriage's id, or nil.
- getSelfId()Source
Get this block's id. Other peripherals'
getSourceIdorgetSubnetworkAnchorIdreturn this same id when they refer to this block.Returns
stringThe block's id.
- getSourceId()Source
Get the id of the block immediately driving this one, or nil if this block has no source.
Returns
stringThe 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
stringThe 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
stringThe network id, or nil.
- getKind()Source
Get this block's role on the kinetic graph: one of
"generator","split_shaft","consumer", or"passthrough".Returns
stringThe 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
numberThe local speed.
- hasSource()Source
Check whether this block is connected to a kinetic source.
Returns
booleanTrue if a source is connected.
- isOverstressed()Source
Check whether the block's network is overstressed.
Returns
booleanTrue 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
numberThe 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 fromCreate_Stressometer#getStressCapacity, which reports the network total.Returns
numberThe per-block stress contribution.