PressurePlate: destroy self when no support is present

This commit is contained in:
Dylan K. Taylor 2023-01-12 19:36:47 +00:00
parent 2f3fcef97c
commit d295e1be54
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D

View File

@ -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
}