mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-19 15:35:52 +00:00
tools/generate-blockstate-upgrade-schema: give better errors when a weird new blockstate version is found
This commit is contained in:
parent
1026811741
commit
4147d0dc75
@ -196,7 +196,14 @@ function generateBlockStateUpgradeSchema(array $upgradeTable) : BlockStateUpgrad
|
||||
if($foundVersion === -1 || $mapping->new->getVersion() === $foundVersion){
|
||||
$foundVersion = $mapping->new->getVersion();
|
||||
}else{
|
||||
throw new AssumptionFailedError("Mixed versions found");
|
||||
$logger = \GlobalLogger::get();
|
||||
$logger->emergency("Mismatched upgraded versions found: $foundVersion and " . $mapping->new->getVersion());
|
||||
$logger->emergency("Mismatched new state: " . $mapping->new->toNbt());
|
||||
$logger->emergency("This is probably because the game didn't recognize the input blockstate, so it was returned unchanged.");
|
||||
$logger->emergency("This is usually because the block is locked behind an experimental toggle that isn't enabled on the world you used when generating this upgrade table.");
|
||||
$logger->emergency("You can test this in a vanilla game using the /give or /setblock commands to try and acquire the block. Keep trying different experiments until you find the right one.");
|
||||
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user