diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 59aaeb3..3f07980 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,7 +1,6 @@ [versions] gson = "2.10.1" -protocol = "3.0.0.Beta2-20240712.120855-17" -raknet = "1.0.0.CR3-20240416.144209-1" +protocol = "3.0.0.Beta3-20240814.133201-7" netty = "4.1.110.Final" fastutil = "8.5.2" mcprotocollib = "86903ec" # Revert from jitpack after release @@ -15,7 +14,6 @@ gson = { module = "com.google.code.gson:gson", version.ref = "gson" } protocol-codec = { module = "org.cloudburstmc.protocol:bedrock-codec", version.ref = "protocol" } protocol-connection = { module = "org.cloudburstmc.protocol:bedrock-connection", version.ref = "protocol" } protocol-common = { module = "org.cloudburstmc.protocol:common", version.ref = "protocol" } -raknet = { group = "org.cloudburstmc.netty", name = "netty-transport-raknet", version.ref = "raknet" } netty-handler = { group = "io.netty", name = "netty-handler", version.ref = "netty" } @@ -32,4 +30,4 @@ indra-publishing = { id = "net.kyori.indra.publishing", version.ref = "indra" } indra-licenser-spotless = { id = "net.kyori.indra.licenser.spotless", version.ref = "indra" } [bundles] -protocol = ["protocol-codec", "protocol-connection", "protocol-common", "raknet"] \ No newline at end of file +protocol = ["protocol-codec", "protocol-connection", "protocol-common"] \ No newline at end of file diff --git a/src/main/java/org/geysermc/globallinkserver/bedrock/util/BedrockVersionUtils.java b/src/main/java/org/geysermc/globallinkserver/bedrock/util/BedrockVersionUtils.java index d357687..cd981a7 100644 --- a/src/main/java/org/geysermc/globallinkserver/bedrock/util/BedrockVersionUtils.java +++ b/src/main/java/org/geysermc/globallinkserver/bedrock/util/BedrockVersionUtils.java @@ -37,35 +37,34 @@ import org.cloudburstmc.protocol.bedrock.codec.v671.Bedrock_v671; import org.cloudburstmc.protocol.bedrock.codec.v685.Bedrock_v685; import org.cloudburstmc.protocol.bedrock.codec.v686.Bedrock_v686; +import org.cloudburstmc.protocol.bedrock.codec.v712.Bedrock_v712; /** * Contains information about the supported Bedrock protocols in GlobalLinkServer. */ public class BedrockVersionUtils { - /** - * Default Bedrock codec that should act as a fallback. Should represent the latest available - * release of the game that GlobalLinkServer supports. + * A list of all supported Bedrock versions that can join GlobalLinkServer */ - public static final BedrockCodec LATEST_CODEC = Bedrock_v686.CODEC; + public static final List SUPPORTED_BEDROCK_CODECS = new ArrayList<>() {{ + add(Bedrock_v589.CODEC); + add(Bedrock_v594.CODEC); + add(Bedrock_v618.CODEC); + add(Bedrock_v622.CODEC); + add(Bedrock_v630.CODEC); + add(Bedrock_v649.CODEC); + add(Bedrock_v662.CODEC); + add(Bedrock_v671.CODEC); + add(Bedrock_v685.CODEC); + add(Bedrock_v686.CODEC); + add(Bedrock_v712.CODEC); + }}; /** - * A list of all supported Bedrock versions that can join GlobalLinkServer + * Default Bedrock codec that should act as a fallback. Should represent the latest available + * release of the game that GlobalLinkServer supports. */ - public static final List SUPPORTED_BEDROCK_CODECS = new ArrayList<>(); - - static { - SUPPORTED_BEDROCK_CODECS.add(Bedrock_v589.CODEC); - SUPPORTED_BEDROCK_CODECS.add(Bedrock_v594.CODEC); - SUPPORTED_BEDROCK_CODECS.add(Bedrock_v618.CODEC); - SUPPORTED_BEDROCK_CODECS.add(Bedrock_v622.CODEC); - SUPPORTED_BEDROCK_CODECS.add(Bedrock_v630.CODEC); - SUPPORTED_BEDROCK_CODECS.add(Bedrock_v649.CODEC); - SUPPORTED_BEDROCK_CODECS.add(Bedrock_v662.CODEC); - SUPPORTED_BEDROCK_CODECS.add(Bedrock_v671.CODEC); - SUPPORTED_BEDROCK_CODECS.add(Bedrock_v685.CODEC); - SUPPORTED_BEDROCK_CODECS.add(LATEST_CODEC); - } + public static final BedrockCodec LATEST_CODEC = SUPPORTED_BEDROCK_CODECS.get(SUPPORTED_BEDROCK_CODECS.size() - 1); /** * Gets the {@link BedrockCodec} of the given protocol version.