// see http://wiki.vg/Protocol_version_numbers
// Get the minecraft-data version string for a protocol version
// TODO: switch to using https://github.com/PrismarineJS/minecraft-data/pull/92
function protocol2version(n) {
if (n >= 48) return '1.9'; // 1.9 snapshots (15w+), 16w03a is 96
if (n >= 6 && n <= 47) return '1.8.9'; // including 1.8 snapshots (14w)
if (n >= 4 && n <= 5) return '1.7.10'; // including 1.7 prereleases
// TODO: earlier versions "Beginning with the 1.7.1 pre-release (and release 1.7.2), versioning was reset."
throw new Error(`unsupported/unknown protocol version: ${versionProtocol}, update protocol2version`);
}