More 1.17 support

This commit is contained in:
nossr50 2021-06-03 14:23:19 -07:00
parent c28c8d164a
commit 97cfb1cfc7
2 changed files with 5 additions and 1 deletions

View File

@ -77,7 +77,8 @@ public class CompatibilityManager {
}
private void initWorldCompatibilityLayer() {
if((minecraftGameVersion.getMinorVersion().asInt() >= 16 && minecraftGameVersion.getPatchVersion().asInt() >= 4)
if(minecraftGameVersion.getMinorVersion().asInt() > 17
|| (minecraftGameVersion.getMinorVersion().asInt() >= 16 && minecraftGameVersion.getPatchVersion().asInt() >= 4)
|| minecraftGameVersion.getMajorVersion().asInt() >= 2) {
if(hasNewWorldMinHeightAPI()) {
worldCompatibilityLayer = new WorldCompatibilityLayer_1_16_4();
@ -213,6 +214,8 @@ public class CompatibilityManager {
} else if(minecraftGameVersion.getPatchVersion().asInt() >= 5) {
return NMSVersion.NMS_1_16_5;
}
case 17:
return NMSVersion.NMS_1_17;
}
}

View File

@ -22,6 +22,7 @@ public enum NMSVersion {
NMS_1_16_3("1.16.3"),
NMS_1_16_4("1.16.4"),
NMS_1_16_5("1.16.5"),
NMS_1_17("1.17"),
//Version not known to this build of mcMMO
UNSUPPORTED("unsupported");