PocketMine-MP 5.23.3 git-f7687af337d001ddbcc47b8e773f014a33faa662
Loading...
Searching...
No Matches
pocketmine\data\bedrock\item\ItemSerializer Class Reference
+ Collaboration diagram for pocketmine\data\bedrock\item\ItemSerializer:

Public Member Functions

 __construct (private BlockStateSerializer $blockStateSerializer)
 
 map (Item $item, \Closure $serializer)
 
 mapBlock (Block $block, \Closure $serializer)
 
 serializeStack (Item $item, ?int $slot=null)
 
 serializeType (Item $item)
 

Detailed Description

Definition at line 37 of file ItemSerializer.php.

Constructor & Destructor Documentation

◆ __construct()

pocketmine\data\bedrock\item\ItemSerializer::__construct ( private BlockStateSerializer $blockStateSerializer)

Definition at line 53 of file ItemSerializer.php.

Member Function Documentation

◆ map()

pocketmine\data\bedrock\item\ItemSerializer::map ( Item $item,
\Closure $serializer )

@phpstan-template TItemType of Item @phpstan-param TItemType $item @phpstan-param \Closure(TItemType) : Data $serializer

Definition at line 65 of file ItemSerializer.php.

◆ mapBlock()

pocketmine\data\bedrock\item\ItemSerializer::mapBlock ( Block $block,
\Closure $serializer )

@phpstan-template TBlockType of Block @phpstan-param TBlockType $block @phpstan-param \Closure(TBlockType) : Data $serializer

Definition at line 78 of file ItemSerializer.php.

◆ serializeStack()

pocketmine\data\bedrock\item\ItemSerializer::serializeStack ( Item $item,
?int $slot = null )

Definition at line 132 of file ItemSerializer.php.

◆ serializeType()

pocketmine\data\bedrock\item\ItemSerializer::serializeType ( Item $item)

@phpstan-template TItemType of Item @phpstan-param TItemType $item

Exceptions
ItemTypeSerializeException

Definition at line 92 of file ItemSerializer.php.


The documentation for this class was generated from the following file: