Skip to content

ItemDeserializer ​

final class · pocketmine\data\bedrock\item\ItemDeserializer · source

Methods ​

__construct() ​

php
public function __construct(\pocketmine\data\bedrock\block\BlockStateDeserializer $blockStateDeserializer)

deserializeStack() ​

php
public function deserializeStack(\pocketmine\data\bedrock\item\SavedItemStackData $data) : \pocketmine\item\Item

deserializeType() ​

php
public function deserializeType(\pocketmine\data\bedrock\item\SavedItemData $data) : \pocketmine\item\Item

getDeserializerForId() ​

php
public function getDeserializerForId(string $id) : ?\Closure

Returns the existing data deserializer for the given ID, or null if none exists. This may be useful if you need to override a deserializer, but still want to be able to fall back to the original.

map() ​

php
public function map(string $id, \Closure $deserializer) : void

mapBlock() ​

php
public function mapBlock(string $id, \Closure $deserializer) : void

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