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

@ -39,28 +39,23 @@ use function lcg_value;
use function min;
abstract class Liquid extends Transparent{
/** @var BlockIdentifierFlattened */
protected $idInfoFlattened;
/** @var int */
public $adjacentSources = 0;
protected BlockIdentifierFlattened $idInfoFlattened;
/** @var Vector3|null */
protected $flowVector = null;
public int $adjacentSources = 0;
protected ?Vector3 $flowVector = null;
/** @var int[] */
private $flowCostVisited = [];
private array $flowCostVisited = [];
private const CAN_FLOW_DOWN = 1;
private const CAN_FLOW = 0;
private const BLOCKED = -1;
/** @var bool */
protected $falling = false;
/** @var int */
protected $decay = 0; //PC "level" property
/** @var bool */
protected $still = false;
protected bool $falling = false;
protected int $decay = 0; //PC "level" property
protected bool $still = false;
public function __construct(BlockIdentifierFlattened $idInfo, string $name, BlockBreakInfo $breakInfo){
$this->idInfoFlattened = $idInfo;