tools/generate-bedrock-data-from-packets: add more exception detail for unexpected block runtimeIDs

This commit is contained in:
Dylan K. Taylor 2024-01-22 18:49:06 +00:00
parent d97c8e2fd2
commit 81d5b9ba06
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D

View File

@ -165,7 +165,7 @@ class ParserPacketHandler extends PacketHandler{
$data->block_states = self::blockStatePropertiesToString($blockState);
}
}elseif($itemStack->getBlockRuntimeId() !== ItemTranslator::NO_BLOCK_RUNTIME_ID){
throw new PacketHandlingException("Non-blockitems should have a zero block runtime ID");
throw new PacketHandlingException("Non-blockitems should have a zero block runtime ID (" . $itemStack->getBlockRuntimeId() . " on " . $itemStringId . ")");
}elseif($meta !== 0){
$data->meta = $meta;
}