ItemIdMetaUpgrader: consistency of API method naming

This commit is contained in:
Dylan K. Taylor 2023-02-21 16:14:31 +00:00
parent 2feb9ca903
commit 94ffef1a99
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D
2 changed files with 3 additions and 3 deletions

View File

@ -63,7 +63,7 @@ final class ItemDataUpgrader{
$blockStateData = null; $blockStateData = null;
} }
[$newNameId, $newMeta] = $this->idMetaUpgrader->upgradeStringIdMeta($rawNameId, $meta); [$newNameId, $newMeta] = $this->idMetaUpgrader->upgrade($rawNameId, $meta);
//TODO: this won't account for spawn eggs from before 1.16.100 - perhaps we're lucky and they just left the meta in there anyway? //TODO: this won't account for spawn eggs from before 1.16.100 - perhaps we're lucky and they just left the meta in there anyway?
@ -136,7 +136,7 @@ final class ItemDataUpgrader{
$blockStateData = null; $blockStateData = null;
} }
[$newNameId, $newMeta] = $this->idMetaUpgrader->upgradeStringIdMeta($rawNameId, $meta); [$newNameId, $newMeta] = $this->idMetaUpgrader->upgrade($rawNameId, $meta);
//TODO: this won't account for spawn eggs from before 1.16.100 - perhaps we're lucky and they just left the meta in there anyway? //TODO: this won't account for spawn eggs from before 1.16.100 - perhaps we're lucky and they just left the meta in there anyway?

View File

@ -60,7 +60,7 @@ final class ItemIdMetaUpgrader{
/** /**
* @phpstan-return array{string, int} * @phpstan-return array{string, int}
*/ */
public function upgradeStringIdMeta(string $id, int $meta) : array{ public function upgrade(string $id, int $meta) : array{
$newId = $id; $newId = $id;
$newMeta = $meta; $newMeta = $meta;
foreach($this->idMetaUpgradeSchemas as $schema){ foreach($this->idMetaUpgradeSchemas as $schema){