Skip to main content

ghast_protocol/generated/v1_16_5/handshaking/
clientbound.rs

1// @generated by ghast-codegen-protocol from PrismarineJS minecraft-data 3.119.0
2// (data/pc/1.16.2/protocol.json, Minecraft 1.16.5). Do not edit; run `cargo run -p ghast-codegen-protocol`.
3// minecraft-data is MIT licensed, Copyright (c) 2015 PrismarineJS; see ../NOTICE.
4
5//! Clientbound packets of the handshaking state.
6
7#![allow(
8    unused_imports,
9    unused_variables,
10    unused_mut,
11    unused_parens,
12    unused_braces,
13    clippy::all,
14    clippy::pedantic,
15    non_camel_case_types,
16    non_snake_case
17)]
18use crate::codec::{Decode, DecodeResult, Encode, EncodeResult, McWrite, Reader, decode_exact};
19use crate::error::{DecodeError, EncodeError};
20use crate::nbt::RawNbt;
21use crate::packet::{Direction, PacketSet, RawPacket, State};
22#[cfg(feature = "testgen")]
23use crate::testgen::{Gen, Generate};
24use crate::types::{BlockPos, ByteString, PositionLayout, Uuid};
25use crate::v1_16_5::types;
26use bytes::{BufMut, Bytes, BytesMut};
27
28/// Packet ids.
29pub mod id {}
30
31/// Every Clientbound packet of the Handshaking state.
32#[derive(Debug, Clone, PartialEq)]
33pub enum ClientboundHandshakingPacket {}
34
35impl PacketSet for ClientboundHandshakingPacket {
36    const STATE: State = State::Handshaking;
37    const DIRECTION: Direction = Direction::Clientbound;
38    fn decode_raw(raw: &RawPacket) -> DecodeResult<Self> {
39        match raw.id {
40            other => Err(DecodeError::UnknownPacketId(other)),
41        }
42    }
43    fn id(&self) -> i32 {
44        match *self {}
45    }
46    fn name(&self) -> &'static str {
47        match *self {}
48    }
49    fn encode_body(&self, w: &mut BytesMut) -> EncodeResult {
50        match *self {}
51    }
52    fn name_of(id: i32) -> Option<&'static str> {
53        match id {
54            _ => None,
55        }
56    }
57}
58
59impl ClientboundHandshakingPacket {
60    /// All packet ids of this set, ascending.
61    pub const IDS: &'static [i32] = &[];
62    /// Generates a random packet with the given id (test support).
63    #[cfg(feature = "testgen")]
64    pub fn generate_by_id(id: i32, g: &mut Gen) -> Option<Self> {
65        match id {
66            _ => None,
67        }
68    }
69}