Skip to content

BlockSerializerDeserializerRegistrar ​

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

Registers serializers and deserializers for block data in a unified style, to avoid code duplication. Not all blocks can be registered this way, but we can avoid a lot of repetition for the ones that can.

Properties ​

$deserializer ​

php
public readonly \pocketmine\data\bedrock\block\convert\BlockStateToObjectDeserializer $deserializer

$serializer ​

php
public readonly \pocketmine\data\bedrock\block\convert\BlockObjectToStateSerializer $serializer

Methods ​

__construct() ​

php
public function __construct(\pocketmine\data\bedrock\block\convert\BlockStateToObjectDeserializer $deserializer, \pocketmine\data\bedrock\block\convert\BlockObjectToStateSerializer $serializer)

mapColored() ​

php
public function mapColored(\pocketmine\block\Block $block, string $idPrefix, string $idSuffix) : void

mapFlattenedId() ​

php
public function mapFlattenedId(\pocketmine\data\bedrock\block\convert\FlattenedIdModel $model) : void

mapModel() ​

php
public function mapModel(\pocketmine\data\bedrock\block\convert\Model $model) : void

mapSimple() ​

php
public function mapSimple(\pocketmine\block\Block $block, string $id) : void

mapSlab() ​

php
public function mapSlab(\pocketmine\block\Slab $block, string $type) : void

mapStairs() ​

php
public function mapStairs(\pocketmine\block\Stair $block, string $id) : void

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