Fixup pressure plate hierarchy

This commit is contained in:
Dylan K. Taylor
2019-02-21 13:06:08 +00:00
parent 28d01025b0
commit eabd8ce026
7 changed files with 141 additions and 47 deletions

View File

@ -25,26 +25,7 @@ namespace pocketmine\block;
use pocketmine\item\TieredTool;
class StonePressurePlate extends Transparent{
/** @var bool */
protected $powered = false;
protected function writeStateToMeta() : int{
return $this->powered ? 1 : 0;
}
public function readStateFromData(int $id, int $stateMeta) : void{
$this->powered = $stateMeta !== 0;
}
public function getStateBitmask() : int{
return 0b1;
}
public function isSolid() : bool{
return false;
}
class StonePressurePlate extends SimplePressurePlate{
public function getHardness() : float{
return 0.5;