Add 1.12 version to MinecraftVersion enum

This commit is contained in:
Marc Baloup 2017-06-08 01:38:10 +02:00
parent 20ed0fee2c
commit 8bc32aaa30

View File

@ -14,7 +14,8 @@ public enum MinecraftVersion {
v1_9_3_to_1_9_4(110, "1.9.3-1.9.4"), v1_9_3_to_1_9_4(110, "1.9.3-1.9.4"),
v1_10(210, "1.10.x"), v1_10(210, "1.10.x"),
v1_11(315, "1.11"), v1_11(315, "1.11"),
v1_11_1_to_1_11_2(316, "1.11.1-1.11.2"); v1_11_1_to_1_11_2(316, "1.11.1-1.11.2"),
v1_12(335, "1.12");
public final int versionNumber; public final int versionNumber;
public final String versionDisplay; public final String versionDisplay;
@ -80,6 +81,11 @@ public enum MinecraftVersion {
versions.remove(v1_11_1_to_1_11_2); versions.remove(v1_11_1_to_1_11_2);
ret.add("1.11"); ret.add("1.11");
} }
// grouping 1.12 versions
if (versions.contains(v1_12)) {
versions.remove(v1_12);
ret.add("1.12");
}
for (MinecraftVersion v : versions) for (MinecraftVersion v : versions)
ret.add(v.versionDisplay); ret.add(v.versionDisplay);