aboutsummaryrefslogtreecommitdiff
path: root/src/v1_15_2.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/v1_15_2.rs')
-rw-r--r--src/v1_15_2.rs39
1 files changed, 1 insertions, 38 deletions
diff --git a/src/v1_15_2.rs b/src/v1_15_2.rs
index 81079de..2671f4a 100644
--- a/src/v1_15_2.rs
+++ b/src/v1_15_2.rs
@@ -6,44 +6,7 @@ use fmt::Debug;
#[cfg(all(test, feature = "std"))]
use crate::protocol::TestRandom;
-#[derive(Debug, PartialEq, Eq, Clone, Copy)]
-pub enum PacketDirection {
- ClientBound,
- ServerBound,
-}
-
-impl PacketDirection {
- pub fn opposite(&self) -> Self {
- use PacketDirection::*;
- match self {
- ClientBound => ServerBound,
- ServerBound => ClientBound,
- }
- }
-}
-
-#[derive(Debug, PartialEq, Eq, Clone, Copy)]
-pub enum State {
- Handshaking,
- Status,
- Login,
- Play,
-}
-
-impl State {
- pub fn name(&self) -> String {
- use State::*;
- match self {
- Handshaking => "Handshaking",
- Status => "Status",
- Login => "Login",
- Play => "Play",
- }
- .to_owned()
- }
-}
-
-define_protocol!(Packet578, RawPacket578, RawPacket578Body, PacketDirection, State, i32, Id => {
+define_protocol!(578, Packet578, RawPacket578, RawPacket578Body => {
// handshaking
Handshake, 0x00, Handshaking, ServerBound => HandshakeSpec {
version: VarInt,