Fixed ordering of MC versions

This commit is contained in:
Marc Baloup 2023-10-21 18:00:40 +02:00
parent 0e016881d7
commit e2506d5d53
3 changed files with 185 additions and 187 deletions

View File

@ -8,6 +8,7 @@ import com.google.gson.TypeAdapter;
import com.google.gson.TypeAdapterFactory;
import com.google.gson.reflect.TypeToken;
import com.google.gson.stream.MalformedJsonException;
import fr.pandacube.lib.core.mc_version.MinecraftVersionList.MinecraftVersionListAdapter;
import java.math.BigInteger;
import java.util.ArrayList;
@ -144,6 +145,7 @@ public class Json {
static {
registerTypeAdapterFactory(StackTraceElementAdapter.FACTORY);
registerTypeAdapterFactory(ThrowableAdapter.FACTORY);
registerTypeAdapterFactory(MinecraftVersionListAdapter.FACTORY);
}

View File

@ -10,7 +10,6 @@ import com.google.gson.JsonSerializer;
import com.google.gson.TypeAdapterFactory;
import com.google.gson.internal.bind.TreeTypeAdapter;
import com.google.gson.reflect.TypeToken;
import fr.pandacube.lib.core.json.Json;
import java.lang.reflect.Type;
import java.util.ArrayList;
@ -27,9 +26,6 @@ public record MinecraftVersionList(
Map<String, Integer> protocolOfVersion,
Map<Integer, List<String>> versionsOfProtocol
) {
static {
Json.registerTypeAdapterFactory(MinecraftVersionListAdapter.FACTORY);
}
/**
* Creates an empty {@link MinecraftVersionList}.

View File

@ -1,182 +1,82 @@
{
"protocolOfVersion": {
"1.20.1": 763,
"1.20": 763,
"1.19.4": 762,
"1.19.3": 761,
"1.19.2": 760,
"1.19.1": 760,
"1.19": 759,
"1.18.2": 758,
"1.18.1": 757,
"1.18": 757,
"1.17.1": 756,
"1.17": 755,
"1.16.5": 754,
"1.16.4": 754,
"1.16.3": 753,
"1.16.2": 751,
"1.16.1": 736,
"1.16": 735,
"1.15.2": 578,
"1.15.1": 575,
"1.15": 573,
"1.14.4": 498,
"1.14.3": 490,
"1.14.2": 485,
"1.14.1": 480,
"1.14": 477,
"1.13.2": 404,
"1.13.1": 401,
"1.13": 393,
"1.12.2": 340,
"1.12.1": 338,
"1.12": 335,
"1.11.2": 316,
"1.11.1": 316,
"1.11": 315,
"1.10.2": 210,
"1.10.1": 210,
"1.10": 210,
"1.9.4": 110,
"1.9.3": 110,
"1.9.2": 109,
"1.9.1": 108,
"1.9": 107,
"1.8.9": 47,
"1.8.8": 47,
"1.8.7": 47,
"1.8.6": 47,
"1.8.5": 47,
"1.8.4": 47,
"1.8.3": 47,
"1.8.2": 47,
"1.8.1": 47,
"1.8": 47,
"1.7.10": 5,
"1.7.9": 5,
"1.7.8": 5,
"1.7.7": 5,
"1.7.6": 5,
"1.7.5": 4,
"1.7.4": 4,
"1.7.3": 4,
"1.7.2": 4,
"1.7.3": 4,
"1.7.4": 4,
"1.7.5": 4,
"1.7.6": 5,
"1.7.7": 5,
"1.7.8": 5,
"1.7.9": 5,
"1.7.10": 5,
"1.8": 47,
"1.8.1": 47,
"1.8.2": 47,
"1.8.3": 47,
"1.8.4": 47,
"1.8.5": 47,
"1.8.6": 47,
"1.8.7": 47,
"1.8.8": 47,
"1.8.9": 47,
"1.9": 107,
"1.9.1": 108,
"1.9.2": 109,
"1.9.3": 110,
"1.9.4": 110,
"1.10": 210,
"1.10.1": 210,
"1.10.2": 210,
"1.11": 315,
"1.11.1": 316,
"1.11.2": 316,
"1.12": 335,
"1.12.1": 338,
"1.12.2": 340,
"1.13": 393,
"1.13.1": 401,
"1.13.2": 404,
"1.14": 477,
"1.14.1": 480,
"1.14.2": 485,
"1.14.3": 490,
"1.14.4": 498,
"1.15": 573,
"1.15.1": 575,
"1.15.2": 578,
"1.16": 735,
"1.16.1": 736,
"1.16.2": 751,
"1.16.3": 753,
"1.16.4": 754,
"1.16.5": 754,
"1.17": 755,
"1.17.1": 756,
"1.18": 757,
"1.18.1": 757,
"1.18.2": 758,
"1.19": 759,
"1.19.1": 760,
"1.19.2": 760,
"1.19.3": 761,
"1.19.4": 762,
"1.20": 763,
"1.20.1": 763,
"1.20.2": 764
},
"versionsOfProtocol": {
"763": [
"1.20",
"1.20.1"
"4": [
"1.7.2",
"1.7.3",
"1.7.4",
"1.7.5"
],
"762": [
"1.19.4"
],
"761": [
"1.19.3"
],
"760": [
"1.19.1",
"1.19.2"
],
"759": [
"1.19"
],
"758": [
"1.18.2"
],
"757": [
"1.18",
"1.18.1"
],
"756": [
"1.17.1"
],
"755": [
"1.17"
],
"754": [
"1.16.4",
"1.16.5"
],
"753": [
"1.16.3"
],
"751": [
"1.16.2"
],
"736": [
"1.16.1"
],
"735": [
"1.16"
],
"578": [
"1.15.2"
],
"575": [
"1.15.1"
],
"573": [
"1.15"
],
"498": [
"1.14.4"
],
"490": [
"1.14.3"
],
"485": [
"1.14.2"
],
"480": [
"1.14.1"
],
"477": [
"1.14"
],
"404": [
"1.13.2"
],
"401": [
"1.13.1"
],
"393": [
"1.13"
],
"340": [
"1.12.2"
],
"338": [
"1.12.1"
],
"335": [
"1.12"
],
"316": [
"1.11.1",
"1.11.2"
],
"315": [
"1.11"
],
"210": [
"1.10",
"1.10.1",
"1.10.2"
],
"110": [
"1.9.3",
"1.9.4"
],
"109": [
"1.9.2"
],
"108": [
"1.9.1"
],
"107": [
"1.9"
"5": [
"1.7.6",
"1.7.7",
"1.7.8",
"1.7.9",
"1.7.10"
],
"47": [
"1.8",
@ -190,18 +90,118 @@
"1.8.8",
"1.8.9"
],
"5": [
"1.7.6",
"1.7.7",
"1.7.8",
"1.7.9",
"1.7.10"
"107": [
"1.9"
],
"4": [
"1.7.2",
"1.7.3",
"1.7.4",
"1.7.5"
"108": [
"1.9.1"
],
"109": [
"1.9.2"
],
"110": [
"1.9.3",
"1.9.4"
],
"210": [
"1.10",
"1.10.1",
"1.10.2"
],
"315": [
"1.11"
],
"316": [
"1.11.1",
"1.11.2"
],
"335": [
"1.12"
],
"338": [
"1.12.1"
],
"340": [
"1.12.2"
],
"393": [
"1.13"
],
"401": [
"1.13.1"
],
"404": [
"1.13.2"
],
"477": [
"1.14"
],
"480": [
"1.14.1"
],
"485": [
"1.14.2"
],
"490": [
"1.14.3"
],
"498": [
"1.14.4"
],
"573": [
"1.15"
],
"575": [
"1.15.1"
],
"578": [
"1.15.2"
],
"735": [
"1.16"
],
"736": [
"1.16.1"
],
"751": [
"1.16.2"
],
"753": [
"1.16.3"
],
"754": [
"1.16.4",
"1.16.5"
],
"755": [
"1.17"
],
"756": [
"1.17.1"
],
"757": [
"1.18",
"1.18.1"
],
"758": [
"1.18.2"
],
"759": [
"1.19"
],
"760": [
"1.19.1",
"1.19.2"
],
"761": [
"1.19.3"
],
"762": [
"1.19.4"
],
"763": [
"1.20",
"1.20.1"
],
"764": [
"1.20.2"