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

@ -38,14 +38,11 @@ class ItemFrame extends Flowable{
public const ROTATIONS = 8;
/** @var bool */
protected $hasMap = false; //makes frame appear large if set
/** @var Item|null */
protected $framedItem = null;
/** @var int */
protected $itemRotation = 0;
/** @var float */
protected $itemDropChance = 1.0;
protected bool $hasMap = false; //makes frame appear large if set
protected ?Item $framedItem = null;
protected int $itemRotation = 0;
protected float $itemDropChance = 1.0;
protected function writeStateToMeta() : int{
return BlockDataSerializer::write5MinusHorizontalFacing($this->facing) | ($this->hasMap ? BlockLegacyMetadata::ITEM_FRAME_FLAG_HAS_MAP : 0);