Skip to content

Instantly share code, notes, and snippets.

@Jo0001
Last active August 17, 2020 16:28
Show Gist options
  • Save Jo0001/5621a4edd9975b7405f80f213402e919 to your computer and use it in GitHub Desktop.
Save Jo0001/5621a4edd9975b7405f80f213402e919 to your computer and use it in GitHub Desktop.
Method to convert the minecraft protocol id to to the corresponding minecraft versio
/**
* Converts the minecraft protocol id to to the corresponding minecraft version
* @param id minecraft protocol id
* @return minecraft version
*/
public static String idToVersion(final int id){
switch (id) {
case 4:
return "1.7.2-1.7.5";
case 5:
return "1.7.6-1.7.10";
case 47:
return "1.8";
case 107:
return "1.9";
case 108:
return "1.9.1";
case 109:
return "1.9.2";
case 110:
return "1.9.3/1.9.4";
case 210:
return "1.10.x";
case 315:
return "1.11";
case 316:
return "1.11.1/1.11.2";
case 335:
return "1.12";
case 338:
return "1.12.1";
case 340:
return "1.12.2";
case 393:
return "1.13";
case 401:
return "1.13.1";
case 404:
return "1.13.2";
case 477:
return "1.14";
case 480:
return "1.14.1";
case 485:
return "1.14.2";
case 490:
return "1.14.3";
case 498:
return "1.14.4";
case 573:
return "1.15";
case 575:
return "1.15.1";
case 578:
return "1.15.2";
case 735:
return "1.16";
case 736:
return "1.16.1";
case 751:
return "1.16.2";
default:
return "Unknown";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment