22declare(strict_types=1);
24namespace pocketmine\data\bedrock\block\upgrade;
28use
function array_diff;
42 public array $oldState,
44 public array $newState,
45 public array $copiedState
48 public function equals(
self $that) : bool{
49 $sameName = $this->newName === $that->newName ||
53 $this->newName->equals($that->newName)
60 count($this->oldState) !== count($that->oldState) ||
61 count($this->newState) !== count($that->newState) ||
62 count($this->copiedState) !== count($that->copiedState) ||
63 count(array_diff($this->copiedState, $that->copiedState)) !== 0
68 if(!isset($that->oldState[$propertyName]) || !$that->oldState[$propertyName]->equals($propertyValue)){
74 if(!isset($that->newState[$propertyName]) || !$that->newState[$propertyName]->equals($propertyValue)){
__construct(public array $oldState, public string|BlockStateUpgradeSchemaFlattenedName $newName, public array $newState, public array $copiedState)
static stringifyKeys(array $array)