Skip to content

Commit

Permalink
Add support for 1.21.20/21
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim203 committed Aug 24, 2024
1 parent 60c3d8f commit 1c11590
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 23 deletions.
6 changes: 2 additions & 4 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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" }

Expand All @@ -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"]
protocol = ["protocol-codec", "protocol-connection", "protocol-common"]
Original file line number Diff line number Diff line change
Expand Up @@ -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<BedrockCodec> 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<BedrockCodec> 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.
Expand Down

0 comments on commit 1c11590

Please sign in to comment.