#How can i reverse the block who got moved by a piston

1 messages · Page 1 of 1 (latest)

atomic wind
#

I want if a condition is true the block will be move to his old location and the pistion will be deactivated, or when i push them or trying to take them with a sticky pistion, this is the code i got currently: ```js
world.afterEvents.pistonActivate.subscribe((data) => {
const attachedBlock = data.piston.getAttachedBlocks()[0]

if (attachedBlock) {
    const position = attachedBlock.location
    // try cancel
    const piston = data.block
}

})

long salmon
#

unless it is simple like in a redstone puzzle

#

or just break the piston

#

if its for claims

#

I think there is a before event

atomic wind