Skip to content

FlattenedIdModel ​

final class · pocketmine\data\bedrock\block\convert\FlattenedIdModel · 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) : self

getBlock() ​

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

getIdComponents() ​

php
public function getIdComponents() : array

getProperties() ​

php
public function getProperties() : array

idComponents() ​

php
public function idComponents(array $components) : self

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.