mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-20 16:00:20 +00:00
PressurePlate: destroy self when no support is present
This commit is contained in:
parent
2f3fcef97c
commit
d295e1be54
@ -55,5 +55,11 @@ abstract class PressurePlate extends Transparent{
|
||||
return !$block->getSupportType(Facing::UP)->equals(SupportType::NONE());
|
||||
}
|
||||
|
||||
public function onNearbyBlockChange() : void{
|
||||
if(!$this->canBeSupportedBy($this->getSide(Facing::DOWN))){
|
||||
$this->position->getWorld()->useBreakOn($this->position);
|
||||
}
|
||||
}
|
||||
|
||||
//TODO
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user