mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-07 02:21:46 +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());
|
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
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user