SignalReactions class abstract final

Stock SignalReactions.

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

door(Map<int, int> closedToOpen, {void onSwing(IVec3 lower)?}) → SignalReaction
A two-high door: closedToOpen pairs its states; both halves open together when either is powered. onSwing after the lower half turns. Register it for every closed and open id.
piston(Map<int, int> retractedToExtended, {required IVec3 facing(int id), required bool pushable(int id), required bool givesWay(int id), void onExtend(IVec3 lower)?}) → SignalReaction
A piston: retractedToExtended pairs its states, facing is the way a state pushes. Powered, the block in front moves one cell on when the cell past it gives way (givesWay) and the block is pushable; a blocked piston stays retracted. Unpowered, the head pulls back (nothing is pulled). Register it for every state.
poweredRun(Map<int, int> offToOn, {int reach = 8}) → SignalReaction
A run of powered rails (or any line of blocks): offToOn pairs the states. The run is the blocks joined on the four sides from the cell (capped at 64); every one within reach steps along it of a powered one is on. Register it for every state.
swap(int off, int on) → SignalReaction
A lamp: off when unpowered, on when powered. Register it for both ids.
trigger(void then(IVec3 cell)) → SignalReaction
Calls then while powered (TNT lit by a wire).