22declare(strict_types=1);
 
   24namespace pocketmine\data\bedrock\block\convert\property;
 
   42        private string $falseValue,
 
   43        private string $trueValue,
 
   44        private \Closure $getter,
 
   45        private \Closure $setter
 
 
   48    public function getName() : string{
 
   53        return [$this->falseValue, $this->trueValue];
 
 
   57        $this->deserializePlain($block, $in->readString($this->name));
 
 
   62            $this->falseValue => 
false,
 
   63            $this->trueValue => 
true,
 
   67        ($this->setter)($block, $value);
 
 
   71        $out->writeString($this->name, $this->serializePlain($block));
 
 
   75        $value = ($this->getter)($block);
 
   76        return $value ? $this->trueValue : $this->falseValue;
 
 
 
__construct(private string $name, private string $falseValue, private string $trueValue, private \Closure $getter, private \Closure $setter)
 
deserialize(object $block, BlockStateReader $in)
 
serialize(object $block, BlockStateWriter $out)
 
deserializePlain(object $block, string $raw)
 
serializePlain(object $block)