PocketMine-MP 5.16.1 git-585aee9386a787c95e73dd0a05ffca8329606b68
pocketmine\data\bedrock\block\convert\BlockObjectToStateSerializer Class Reference
+ Inheritance diagram for pocketmine\data\bedrock\block\convert\BlockObjectToStateSerializer:
+ Collaboration diagram for pocketmine\data\bedrock\block\convert\BlockObjectToStateSerializer:

Public Member Functions

 map (Block $block, \Closure $serializer)
 
 mapLog (Wood $block, string $unstrippedId, string $strippedId)
 
 mapSimple (Block $block, string $id)
 
 mapSlab (Slab $block, string $singleId, string $doubleId)
 
 mapStairs (Stair $block, string $id)
 
 registerFlatColorBlockSerializers ()
 
 serialize (int $stateId)
 
 serializeBlock (Block $blockState)
 

Detailed Description

Definition at line 184 of file BlockObjectToStateSerializer.php.

Constructor & Destructor Documentation

◆ __construct()

pocketmine\data\bedrock\block\convert\BlockObjectToStateSerializer::__construct ( )

Definition at line 200 of file BlockObjectToStateSerializer.php.

Member Function Documentation

◆ map()

pocketmine\data\bedrock\block\convert\BlockObjectToStateSerializer::map ( Block  $block,
\Closure  $serializer 
)

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

Definition at line 223 of file BlockObjectToStateSerializer.php.

References pocketmine\block\Block\getTypeId().

+ Here is the call graph for this function:

◆ mapLog()

pocketmine\data\bedrock\block\convert\BlockObjectToStateSerializer::mapLog ( Wood  $block,
string  $unstrippedId,
string  $strippedId 
)

Definition at line 242 of file BlockObjectToStateSerializer.php.

◆ mapSimple()

pocketmine\data\bedrock\block\convert\BlockObjectToStateSerializer::mapSimple ( Block  $block,
string  $id 
)

Definition at line 230 of file BlockObjectToStateSerializer.php.

◆ mapSlab()

pocketmine\data\bedrock\block\convert\BlockObjectToStateSerializer::mapSlab ( Slab  $block,
string  $singleId,
string  $doubleId 
)

Definition at line 234 of file BlockObjectToStateSerializer.php.

◆ mapStairs()

pocketmine\data\bedrock\block\convert\BlockObjectToStateSerializer::mapStairs ( Stair  $block,
string  $id 
)

Definition at line 238 of file BlockObjectToStateSerializer.php.

◆ registerFlatColorBlockSerializers()

pocketmine\data\bedrock\block\convert\BlockObjectToStateSerializer::registerFlatColorBlockSerializers ( )

Definition at line 317 of file BlockObjectToStateSerializer.php.

◆ serialize()

pocketmine\data\bedrock\block\convert\BlockObjectToStateSerializer::serialize ( int  $stateId)

Serializes an implementation-defined blockstate ID to NBT for storage.

@phpstan-param BlockStateId $stateId

Exceptions
BlockStateSerializeException

Implements pocketmine\data\bedrock\block\BlockStateSerializer.

Definition at line 212 of file BlockObjectToStateSerializer.php.

◆ serializeBlock()

pocketmine\data\bedrock\block\convert\BlockObjectToStateSerializer::serializeBlock ( Block  $blockState)

@phpstan-template TBlockType of Block @phpstan-param TBlockType $blockState

Exceptions
BlockStateSerializeException

Definition at line 252 of file BlockObjectToStateSerializer.php.


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