WorldGuard

WorldGuard

8M Downloads

Piston flag

ryantheleach opened this issue ยท 5 comments

commented

There should be a piston flag that disables blocks from being pushed into/out of a region.

commented

slightly problematic due to the fact that pistons push up to 12 blocks
and every one has to be checked for regions

commented

Option to prevent pistons being placed within 12 blocks of a region you don't have access to, maybe?

commented

that would have to check 13^3 blocks (although only on place)
plus regions can be created afterwards etc

I am not sure of the piston event status, but i heard it's still getting some more features
I think the only reasonable way will be to check 12 blocks (or more/less depending on the event) for regions, but it will probably have a config option or similar for people who experience slowing down (complex piston machinery could get very spammy)

commented

It wouldn't need to check each block individually, it could check for intersections with a dummy region created temporarily around the piston block. Also it would only need to check "in front" of the piston.
But, still pistons could push other pistons into range of someone else's region, so maybe events would be better.

commented

Creating a dummy region and then checking overlapping regions is a
good idea, I hadn't thought of that (although I'm not sure what it
does codewise atm, I'll have to check for efficiency when I get around
to it.)