BlockSerializerDeserializerRegistrar
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 $serializerMethods
__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) : voidmapFlattenedId()
php
public function mapFlattenedId(\pocketmine\data\bedrock\block\convert\FlattenedIdModel $model) : voidmapModel()
php
public function mapModel(\pocketmine\data\bedrock\block\convert\Model $model) : voidmapSimple()
php
public function mapSimple(\pocketmine\block\Block $block, string $id) : voidmapSlab()
php
public function mapSlab(\pocketmine\block\Slab $block, string $type) : voidmapStairs()
php
public function mapStairs(\pocketmine\block\Stair $block, string $id) : void