aboutsummaryrefslogtreecommitdiff
path: root/azalea-protocol/src/packets/game/clientbound_server_links_packet.rs
diff options
context:
space:
mode:
authormat <27899617+mat-1@users.noreply.github.com>2024-10-23 00:08:13 -0500
committerGitHub <noreply@github.com>2024-10-23 00:08:13 -0500
commit40e4096d2435533eacb817ad5a5e12c7ced8fa5c (patch)
tree937c4024bb7f69b19b6d053e02a9e5b3b02d98aa /azalea-protocol/src/packets/game/clientbound_server_links_packet.rs
parentabc7b43b8c641b6dc4b107bb9624b86235bd36db (diff)
downloadazalea-drasl-40e4096d2435533eacb817ad5a5e12c7ced8fa5c.tar.xz
1.21.2 (#171)
* partially implement 24w35a * start updating to 24w39a + itemcomponent codegen * fix codegen and broken packets to finish updating to 24w39a :D * update to 1.21.2 except for blocks * update ServerboundPlayerInputPacket impl
Diffstat (limited to 'azalea-protocol/src/packets/game/clientbound_server_links_packet.rs')
-rw-r--r--azalea-protocol/src/packets/game/clientbound_server_links_packet.rs34
1 files changed, 34 insertions, 0 deletions
diff --git a/azalea-protocol/src/packets/game/clientbound_server_links_packet.rs b/azalea-protocol/src/packets/game/clientbound_server_links_packet.rs
new file mode 100644
index 00000000..4b24a519
--- /dev/null
+++ b/azalea-protocol/src/packets/game/clientbound_server_links_packet.rs
@@ -0,0 +1,34 @@
+use azalea_buf::McBuf;
+use azalea_chat::FormattedText;
+use azalea_protocol_macros::ClientboundGamePacket;
+
+#[derive(Clone, Debug, McBuf, ClientboundGamePacket)]
+pub struct ClientboundServerLinksPacket {
+ pub links: Vec<ServerLinkEntry>,
+}
+
+#[derive(Clone, Debug, McBuf)]
+pub struct ServerLinkEntry {
+ pub kind: ServerLinkKind,
+ pub link: String,
+}
+
+#[derive(Clone, Debug, McBuf)]
+pub enum ServerLinkKind {
+ Known(KnownLinkKind),
+ Component(FormattedText),
+}
+
+#[derive(Clone, Copy, Debug, McBuf)]
+pub enum KnownLinkKind {
+ BugReport,
+ CommunityGuidelines,
+ Support,
+ Status,
+ Feedback,
+ Community,
+ Website,
+ Forums,
+ News,
+ Announcements,
+}