Package fr.fidorial.event.redstone
package fr.fidorial.event.redstone
Events fired by redstone: a signal spreading through dust, components switching, blocks reacting
to being powered, pistons moving, and the block updates carrying it all from one block to the next.
Every event of this package is a RedstoneEvent, posted on
the thread of the region owning the block, and only built while a listener is subscribed to it.
- Since:
- 0.1.0
-
InterfacesClassDescriptionAn event about a piston about to move:
RedstoneEvent.position()is its base, andRedstoneEvent.block()the state of that base before it moves.Fired when a powered piston is about to extend: its head comes out and pushes the blocks in front of it.Fired when a piston that is no longer powered is about to retract: its head comes back in, and a sticky piston pulls the block in front of its head along.Fired when redstone dust is about to change the power it carries, as a signal spreads along a line of dust or fades from it: one event per dust whose power changes.An event about one block taking part in redstone.Fired when a block that listens to redstone is about to react to being powered, or to no longer being powered: a lamp lighting up or going out, a door, a trapdoor or a fence gate opening or closing, a note block playing, a copper bulb switching.Fired when a redstone component is about to change the signal it emits: a lever pulled, a button pressed or popping back out, a torch turning on or off, a repeater or a comparator switching, an observer pulsing.Fired when a block taking part in redstone is told that one of its neighbours changed, before it reacts: the block update that carries redstone from one block to the next.