Use typed properties in block namespace

This commit is contained in:
Dylan K. Taylor
2021-05-22 23:52:31 +01:00
parent 73c229a236
commit f68b9e79e1
68 changed files with 134 additions and 246 deletions

View File

@ -36,10 +36,8 @@ use pocketmine\world\sound\DoorSound;
class Trapdoor extends Transparent{
use HorizontalFacingTrait;
/** @var bool */
protected $open = false;
/** @var bool */
protected $top = false;
protected bool $open = false;
protected bool $top = false;
protected function writeStateToMeta() : int{
return BlockDataSerializer::write5MinusHorizontalFacing($this->facing) | ($this->top ? BlockLegacyMetadata::TRAPDOOR_FLAG_UPPER : 0) | ($this->open ? BlockLegacyMetadata::TRAPDOOR_FLAG_OPEN : 0);