aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xCargo.lock7
-rwxr-xr-xazalea-auth/Cargo.toml2
-rwxr-xr-xazalea-client/Cargo.toml2
-rwxr-xr-xazalea-core/Cargo.toml2
-rw-r--r--azalea-language/Cargo.toml2
-rwxr-xr-xazalea-protocol/Cargo.toml7
-rwxr-xr-xazalea-protocol/src/packets/mod.rs16
-rwxr-xr-xbot/Cargo.toml2
8 files changed, 22 insertions, 18 deletions
diff --git a/Cargo.lock b/Cargo.lock
index f3b5df08..a73b340f 100755
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -167,12 +167,9 @@ dependencies = [
"byteorder",
"bytes",
"flate2",
- "num-derive",
- "num-traits",
"packet-macros",
"serde",
"serde_json",
- "thiserror",
"tokio",
"tokio-util",
"trust-dns-resolver",
@@ -1420,9 +1417,9 @@ dependencies = [
[[package]]
name = "uuid"
-version = "0.8.2"
+version = "1.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7"
+checksum = "dd6469f4314d5f1ffec476e05f17cc9a78bc7a27a6a857842170bdf8d6f98d2f"
[[package]]
name = "version_check"
diff --git a/azalea-auth/Cargo.toml b/azalea-auth/Cargo.toml
index aa9b7bdb..a7a11b53 100755
--- a/azalea-auth/Cargo.toml
+++ b/azalea-auth/Cargo.toml
@@ -6,4 +6,4 @@ version = "0.1.0"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
-uuid = "^0.8.2"
+uuid = "^1.1.2"
diff --git a/azalea-client/Cargo.toml b/azalea-client/Cargo.toml
index 1156f8de..eaf7b0dc 100755
--- a/azalea-client/Cargo.toml
+++ b/azalea-client/Cargo.toml
@@ -11,4 +11,4 @@ azalea-core = {path = "../azalea-core"}
azalea-crypto = {path = "../azalea-crypto"}
azalea-protocol = {path = "../azalea-protocol"}
azalea-world = {path = "../azalea-world"}
-tokio = {version = "1.18.0", features = ["sync"]}
+tokio = {version = "1.19.2", features = ["sync"]}
diff --git a/azalea-core/Cargo.toml b/azalea-core/Cargo.toml
index d652a46e..27112b21 100755
--- a/azalea-core/Cargo.toml
+++ b/azalea-core/Cargo.toml
@@ -8,4 +8,4 @@ version = "0.1.0"
[dependencies]
azalea-chat = {path = "../azalea-chat"}
azalea-nbt = {path = "../azalea-nbt"}
-uuid = "^0.8.2"
+uuid = "^1.1.2"
diff --git a/azalea-language/Cargo.toml b/azalea-language/Cargo.toml
index 0e093008..dea9aa27 100644
--- a/azalea-language/Cargo.toml
+++ b/azalea-language/Cargo.toml
@@ -9,4 +9,4 @@ version = "0.1.0"
lazy_static = "1.4.0"
serde = "1.0.137"
serde_json = "1.0.81"
-# tokio = {version = "1.18.2", features = ["fs"]}
+# tokio = {version = "1.19.2", features = ["fs"]}
diff --git a/azalea-protocol/Cargo.toml b/azalea-protocol/Cargo.toml
index 899b44a8..d98705bd 100755
--- a/azalea-protocol/Cargo.toml
+++ b/azalea-protocol/Cargo.toml
@@ -17,13 +17,10 @@ azalea-nbt = {path = "../azalea-nbt"}
byteorder = "^1.4.3"
bytes = "^1.1.0"
flate2 = "1.0.23"
-num-derive = "^0.3.3"
-num-traits = "^0.2.14"
packet-macros = {path = "./packet-macros"}
serde = {version = "1.0.130", features = ["serde_derive"]}
serde_json = "^1.0.72"
-thiserror = "^1.0.30"
-tokio = {version = "^1.14.0", features = ["io-util", "net", "macros"]}
+tokio = {version = "1.19.2", features = ["io-util", "net", "macros"]}
tokio-util = "^0.6.9"
trust-dns-resolver = "^0.20.3"
-uuid = "^0.8.2"
+uuid = "^1.1.2"
diff --git a/azalea-protocol/src/packets/mod.rs b/azalea-protocol/src/packets/mod.rs
index 1cc79b79..73a3a842 100755
--- a/azalea-protocol/src/packets/mod.rs
+++ b/azalea-protocol/src/packets/mod.rs
@@ -9,12 +9,10 @@ use crate::{
connect::PacketFlow,
mc_buf::{McBufReadable, McBufWritable, Readable, Writable},
};
-use num_derive::FromPrimitive;
-use num_traits::FromPrimitive;
pub const PROTOCOL_VERSION: u32 = 759;
-#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, FromPrimitive)]
+#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub enum ConnectionProtocol {
Handshake = -1,
Game = 0,
@@ -22,6 +20,18 @@ pub enum ConnectionProtocol {
Login = 2,
}
+impl ConnectionProtocol {
+ pub fn from_i32(i: i32) -> Option<Self> {
+ match i {
+ -1 => Some(ConnectionProtocol::Handshake),
+ 0 => Some(ConnectionProtocol::Game),
+ 1 => Some(ConnectionProtocol::Status),
+ 2 => Some(ConnectionProtocol::Login),
+ _ => None,
+ }
+ }
+}
+
#[derive(Clone, Debug)]
pub enum Packet {
Game(game::GamePacket),
diff --git a/bot/Cargo.toml b/bot/Cargo.toml
index e55f6c3d..1a6a44a3 100755
--- a/bot/Cargo.toml
+++ b/bot/Cargo.toml
@@ -9,4 +9,4 @@ version = "0.1.0"
azalea-client = {path = "../azalea-client"}
azalea-core = {path = "../azalea-core"}
azalea-protocol = {path = "../azalea-protocol"}
-tokio = "^1.14.0"
+tokio = "1.19.2"