mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-03 08:35:20 +00:00
PressurePlate: destroy self when no support is present
This commit is contained in:
@ -55,5 +55,11 @@ abstract class PressurePlate extends Transparent{
|
|||||||
return !$block->getSupportType(Facing::UP)->equals(SupportType::NONE());
|
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
|
//TODO
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user