mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-05 17:41:46 +00:00
BlockStateUpgradeSchema: added isEmpty()
This commit is contained in:
parent
1b3e50d0a3
commit
0a0383d9bd
@ -73,4 +73,21 @@ final class BlockStateUpgradeSchema{
|
|||||||
public function getVersionId() : int{
|
public function getVersionId() : int{
|
||||||
return ($this->maxVersionMajor << 24) | ($this->maxVersionMinor << 16) | ($this->maxVersionPatch << 8) | $this->maxVersionRevision;
|
return ($this->maxVersionMajor << 24) | ($this->maxVersionMinor << 16) | ($this->maxVersionPatch << 8) | $this->maxVersionRevision;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function isEmpty() : bool{
|
||||||
|
foreach([
|
||||||
|
$this->renamedIds,
|
||||||
|
$this->addedProperties,
|
||||||
|
$this->removedProperties,
|
||||||
|
$this->renamedProperties,
|
||||||
|
$this->remappedPropertyValues,
|
||||||
|
$this->remappedStates,
|
||||||
|
] as $list){
|
||||||
|
if(count($list) !== 0){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user