API
SuperPiston fires a PistonStructureCalculationEvent
when a piston attempts to move. This event is divided in two phases: Pre
and Post
. In the first phase, listeners have to negociate and choose a PistonStructureCalculator
. The vanilla calculator is DefaultStructureCalculator
. Between the two phases, the calculator creates a PistonStructure
that describes which blocks will be moved or destroyed. In the second phase, the structure cannot be modified but the event can still be cancelled.