PocketMine-MP 5.42.1 git-d77520d210fcb967a02bc11817ad625393c8ebc6
Loading...
Searching...
No Matches
pocketmine\data\bedrock\block\convert\property\ValueFromIntProperty Class Reference
+ Inheritance diagram for pocketmine\data\bedrock\block\convert\property\ValueFromIntProperty:
+ Collaboration diagram for pocketmine\data\bedrock\block\convert\property\ValueFromIntProperty:

Public Member Functions

 __construct (private string $name, private StateMap $map, private \Closure $getter, private \Closure $setter)
 
 deserialize (object $block, BlockStateReader $in)
 
 getName ()
 
 getPossibleValues ()
 
 serialize (object $block, BlockStateWriter $out)
 

Detailed Description

@phpstan-template TBlock of object @phpstan-template TValue of int|\UnitEnum @phpstan-implements Property<TBlock>

Definition at line 35 of file ValueFromIntProperty.php.

Constructor & Destructor Documentation

◆ __construct()

pocketmine\data\bedrock\block\convert\property\ValueFromIntProperty::__construct ( private string $name,
private StateMap $map,
private \Closure $getter,
private \Closure $setter )

@phpstan-param StateMap<TValue, int> $map @phpstan-param \Closure(TBlock) : TValue $getter @phpstan-param \Closure(TBlock, TValue) : mixed $setter

Definition at line 42 of file ValueFromIntProperty.php.

Member Function Documentation

◆ deserialize()

pocketmine\data\bedrock\block\convert\property\ValueFromIntProperty::deserialize ( object $block,
BlockStateReader $in )

@phpstan-param TBlock $block

Implements pocketmine\data\bedrock\block\convert\property\Property.

Definition at line 59 of file ValueFromIntProperty.php.

◆ getName()

pocketmine\data\bedrock\block\convert\property\ValueFromIntProperty::getName ( )

◆ getPossibleValues()

pocketmine\data\bedrock\block\convert\property\ValueFromIntProperty::getPossibleValues ( )
Returns
int[] @phpstan-return list<int>

Definition at line 55 of file ValueFromIntProperty.php.

◆ serialize()

pocketmine\data\bedrock\block\convert\property\ValueFromIntProperty::serialize ( object $block,
BlockStateWriter $out )

@phpstan-param TBlock $block

Implements pocketmine\data\bedrock\block\convert\property\Property.

Definition at line 69 of file ValueFromIntProperty.php.


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