Skip to content

Model ​

final class · pocketmine\data\bedrock\block\convert\Model · source

This class works around a limitation in PHPStan. Ideally, we'd just have a function that accepted ($block, $id, $properties) all together and just have the template type inferred from $block alone. However, there's no way to tell PHPStan to ignore $properties for inference, so we're stuck with this hack.

Methods ​

create() ​

php
public static function create(\pocketmine\block\Block $block, string $id) : self

getBlock() ​

php
public function getBlock() : \pocketmine\block\Block

getId() ​

php
public function getId() : string

getProperties() ​

php
public function getProperties() : array

properties() ​

php
public function properties(array $properties) : self

VanillaMine is a fork of PocketMine-MP, maintained by Luxury Nodes. Not affiliated with the PMMP team or Mojang.