Contains information related to changes to a piston expanding or retracting.
import { world, system, PistonActivateAfterEvent } from '@minecraft/server';world.afterEvents.pistonActivate.subscribe((pistonEvent: PistonActivateAfterEvent) => { console.warn( `Piston event at ${system.currentTick} ${(pistonEvent.piston.isMoving ? ' Moving' : 'Not moving')} with state: ${pistonEvent.piston.state}`, );}); Copy
import { world, system, PistonActivateAfterEvent } from '@minecraft/server';world.afterEvents.pistonActivate.subscribe((pistonEvent: PistonActivateAfterEvent) => { console.warn( `Piston event at ${system.currentTick} ${(pistonEvent.piston.isMoving ? ' Moving' : 'Not moving')} with state: ${pistonEvent.piston.state}`, );});
Readonly
Block impacted by this event.
Dimension that contains the block that is the subject of this event.
True if the piston is the process of expanding.
Contains additional properties and details of the piston.
Contains information related to changes to a piston expanding or retracting.
Example: pistonAfterEvent.ts