mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-16 03:51:37 +00:00
the function stringToLegacy gives already null useless to put a default null (#4338)
This commit is contained in:
@@ -87,7 +87,7 @@ final class RuntimeBlockMapping{
|
|||||||
$idToStatesMap[$state->getString("name")][] = $k;
|
$idToStatesMap[$state->getString("name")][] = $k;
|
||||||
}
|
}
|
||||||
foreach($legacyStateMap as $pair){
|
foreach($legacyStateMap as $pair){
|
||||||
$id = $legacyIdMap->stringToLegacy($pair->getId()) ?? null;
|
$id = $legacyIdMap->stringToLegacy($pair->getId());
|
||||||
if($id === null){
|
if($id === null){
|
||||||
throw new \RuntimeException("No legacy ID matches " . $pair->getId());
|
throw new \RuntimeException("No legacy ID matches " . $pair->getId());
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user