From e9a55cf976c8fe1f110c2e231effcce12a1e07d5 Mon Sep 17 00:00:00 2001 From: StripedMonkey Date: Thu, 19 Sep 2024 03:04:01 -0400 Subject: [PATCH 1/2] misc spelling fixes in comments and variables --- pumpkin-protocol/src/lib.rs | 8 ++++---- pumpkin/src/client/mod.rs | 2 +- pumpkin/src/entity/mod.rs | 2 +- pumpkin/src/entity/player.rs | 2 +- pumpkin/src/server/connection_cache.rs | 2 +- pumpkin/src/world/mod.rs | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/pumpkin-protocol/src/lib.rs b/pumpkin-protocol/src/lib.rs index 4381934b4..aea2e4891 100644 --- a/pumpkin-protocol/src/lib.rs +++ b/pumpkin-protocol/src/lib.rs @@ -193,14 +193,14 @@ pub trait ServerPacket: Packet + Sized { pub struct StatusResponse { /// The version on which the Server is running. Optional pub version: Option, - /// Informations about currently connected Players. Optional + /// Information about currently connected Players. Optional pub players: Option, /// The description displayed also called MOTD (Message of the day). Optional pub description: String, /// The icon displayed, Optional pub favicon: Option, /// Players are forced to use Secure chat - pub enforece_secure_chat: bool, + pub enforce_secure_chat: bool, } #[derive(Serialize)] pub struct Version { @@ -216,7 +216,7 @@ pub struct Players { pub max: u32, /// The current online player count pub online: u32, - /// Informations about currently connected players. + /// Information about currently connected players. /// Note player can disable listing here. pub sample: Vec, } @@ -229,7 +229,7 @@ pub struct Sample { pub id: String, } -// basicly game profile +// basically game profile #[derive(Serialize, Deserialize, Clone, Debug)] pub struct Property { pub name: String, diff --git a/pumpkin/src/client/mod.rs b/pumpkin/src/client/mod.rs index 9dc174072..af7f2ec9f 100644 --- a/pumpkin/src/client/mod.rs +++ b/pumpkin/src/client/mod.rs @@ -81,7 +81,7 @@ impl Default for PlayerConfig { } } -/// Everything which makes a Conection with our Server is a `Client`. +/// Everything which makes a Connection with our Server is a `Client`. /// Client will become Players when they reach the `Play` state pub struct Client { /// The client's game profile information. diff --git a/pumpkin/src/entity/mod.rs b/pumpkin/src/entity/mod.rs index d80b2244d..68c323a6b 100644 --- a/pumpkin/src/entity/mod.rs +++ b/pumpkin/src/entity/mod.rs @@ -123,7 +123,7 @@ impl Entity { /// Kills the Entity /// - /// This is simliar to `kill` but Spawn Particles, Animation and plays death sound + /// This is similar to `kill` but Spawn Particles, Animation and plays death sound pub fn kill(&self) { // Spawns death smoke particles self.world diff --git a/pumpkin/src/entity/player.rs b/pumpkin/src/entity/player.rs index 252d4dcc4..66be814de 100644 --- a/pumpkin/src/entity/player.rs +++ b/pumpkin/src/entity/player.rs @@ -237,7 +237,7 @@ impl Player { "Setting the same gamemode as already is" ); self.gamemode.store(gamemode); - // So a little story time. I actually made an abitlties_from_gamemode function. I looked at vanilla and they always send the abilties from the gamemode. But the funny thing actually is. That the client + // So a little story time. I actually made an abilties_from_gamemode function. I looked at vanilla and they always send the abilties from the gamemode. But the funny thing actually is. That the client // does actually use the same method and set the abilties when receiving the CGameEvent gamemode packet. Just Mojang nonsense self.entity .world diff --git a/pumpkin/src/server/connection_cache.rs b/pumpkin/src/server/connection_cache.rs index a8268ba3a..49a65c4c2 100644 --- a/pumpkin/src/server/connection_cache.rs +++ b/pumpkin/src/server/connection_cache.rs @@ -80,7 +80,7 @@ impl CachedStatus { }), description: config.motd.clone(), favicon: icon, - enforece_secure_chat: false, + enforce_secure_chat: false, } } diff --git a/pumpkin/src/world/mod.rs b/pumpkin/src/world/mod.rs index b61ddc868..308ce4abf 100644 --- a/pumpkin/src/world/mod.rs +++ b/pumpkin/src/world/mod.rs @@ -220,7 +220,7 @@ impl World { .client .send_packet(&CGameEvent::new(GameEvent::StartWaitingChunks, 0.0)); - // Spawn in inital chunks + // Spawn in initial chunks player_chunker::player_join(self, player.clone()).await; } From 229be05e98065530a2ab75492906a0f84abacbd3 Mon Sep 17 00:00:00 2001 From: StripedMonkey Date: Thu, 19 Sep 2024 03:10:26 -0400 Subject: [PATCH 2/2] run formatter on cargo.toml files --- Cargo.toml | 6 +++--- pumpkin-config/Cargo.toml | 1 - pumpkin-inventory/Cargo.toml | 2 +- pumpkin-protocol/Cargo.toml | 2 +- pumpkin-registry/Cargo.toml | 4 ++-- pumpkin-world/Cargo.toml | 2 +- pumpkin/Cargo.toml | 25 +++++++++++++++---------- 7 files changed, 23 insertions(+), 19 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 9b13bf54b..3770fdc9d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -25,11 +25,11 @@ codegen-units = 1 [workspace.dependencies] log = "0.4" tokio = { version = "1.40", features = [ - "net", - "macros", - "rt-multi-thread", "fs", "io-util", + "macros", + "net", + "rt-multi-thread", "sync", ] } diff --git a/pumpkin-config/Cargo.toml b/pumpkin-config/Cargo.toml index eacb43380..d3ce22e43 100644 --- a/pumpkin-config/Cargo.toml +++ b/pumpkin-config/Cargo.toml @@ -9,4 +9,3 @@ serde.workspace = true log.workspace = true toml = "0.8" - diff --git a/pumpkin-inventory/Cargo.toml b/pumpkin-inventory/Cargo.toml index 29daefc7e..66c4c427a 100644 --- a/pumpkin-inventory/Cargo.toml +++ b/pumpkin-inventory/Cargo.toml @@ -5,7 +5,7 @@ edition.workspace = true [dependencies] # For items -pumpkin-world = { path = "../pumpkin-world"} +pumpkin-world = { path = "../pumpkin-world" } num-traits = "0.2" num-derive = "0.4" diff --git a/pumpkin-protocol/Cargo.toml b/pumpkin-protocol/Cargo.toml index 0c0ab1296..32d0a92bd 100644 --- a/pumpkin-protocol/Cargo.toml +++ b/pumpkin-protocol/Cargo.toml @@ -5,7 +5,7 @@ edition.workspace = true [dependencies] pumpkin-macros = { path = "../pumpkin-macros" } -pumpkin-world = { path = "../pumpkin-world" } +pumpkin-world = { path = "../pumpkin-world" } pumpkin-core = { path = "../pumpkin-core" } bytes = "1.7" diff --git a/pumpkin-registry/Cargo.toml b/pumpkin-registry/Cargo.toml index f4fe985d9..922cd5b06 100644 --- a/pumpkin-registry/Cargo.toml +++ b/pumpkin-registry/Cargo.toml @@ -4,8 +4,8 @@ version.workspace = true edition.workspace = true [dependencies] -pumpkin-protocol = { path = "../pumpkin-protocol"} -pumpkin-core = { path = "../pumpkin-core"} +pumpkin-protocol = { path = "../pumpkin-protocol" } +pumpkin-core = { path = "../pumpkin-core" } # nbt fastnbt = { git = "https://github.com/owengage/fastnbt.git" } diff --git a/pumpkin-world/Cargo.toml b/pumpkin-world/Cargo.toml index 56f6dadee..44ebeddaf 100644 --- a/pumpkin-world/Cargo.toml +++ b/pumpkin-world/Cargo.toml @@ -4,7 +4,7 @@ version.workspace = true edition.workspace = true [dependencies] -pumpkin-core = { path = "../pumpkin-core"} +pumpkin-core = { path = "../pumpkin-core" } fastnbt = { git = "https://github.com/owengage/fastnbt.git" } tokio.workspace = true diff --git a/pumpkin/Cargo.toml b/pumpkin/Cargo.toml index 839947f0f..931be7113 100644 --- a/pumpkin/Cargo.toml +++ b/pumpkin/Cargo.toml @@ -10,14 +10,14 @@ plugins = ["pumpkin-plugin/plugins"] [dependencies] # pumpkin -pumpkin-core = { path = "../pumpkin-core"} +pumpkin-core = { path = "../pumpkin-core" } pumpkin-config = { path = "../pumpkin-config" } -pumpkin-plugin = { path = "../pumpkin-plugin"} -pumpkin-inventory = { path = "../pumpkin-inventory"} -pumpkin-world = { path = "../pumpkin-world"} -pumpkin-entity = { path = "../pumpkin-entity"} -pumpkin-protocol = { path = "../pumpkin-protocol"} -pumpkin-registry = { path = "../pumpkin-registry"} +pumpkin-plugin = { path = "../pumpkin-plugin" } +pumpkin-inventory = { path = "../pumpkin-inventory" } +pumpkin-world = { path = "../pumpkin-world" } +pumpkin-entity = { path = "../pumpkin-entity" } +pumpkin-protocol = { path = "../pumpkin-protocol" } +pumpkin-registry = { path = "../pumpkin-registry" } itertools = "0.13.0" @@ -40,7 +40,12 @@ rsa = "0.9.6" rsa-der = "0.3.0" # authentication -reqwest = { version = "0.12.7", default-features= false, features = ["json", "rustls-tls", "http2", "macos-system-configuration"]} +reqwest = { version = "0.12.7", default-features = false, features = [ + "http2", + "json", + "macos-system-configuration", + "rustls-tls", +] } sha1 = "0.10.6" digest = "=0.11.0-pre.9" @@ -53,14 +58,14 @@ thiserror = "1.0" # icon loading base64 = "0.22.1" -image = { version = "0.25", default-features = false, features = ["png"]} +image = { version = "0.25", default-features = false, features = ["png"] } # logging simple_logger = "5.0.0" log.workspace = true # networking -mio = { version = "1.0.2", features = ["os-poll", "net"]} +mio = { version = "1.0.2", features = ["net", "os-poll"] } parking_lot.workspace = true crossbeam.workspace = true