Skip to content

Commit

Permalink
Check all blocks moved by piston instead of only one. (#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
0ffz authored May 3, 2020
1 parent a26629a commit 2971e40
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ object SectionSyncListener : Listener {
/** Disables pistons if they are in the overlap of two sections */
@EventHandler
fun onPistonEvent(event: BlockPistonExtendEvent) {
if (event.block.location.correspondingSection != null)
//TODO handle pistons properly instead of just cancelling the event
if (event.blocks.any { it.location.correspondingSection != null })
event.isCancelled = true
}

Expand Down

0 comments on commit 2971e40

Please sign in to comment.