diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8ffa4b70e..b28c669c0 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -3,7 +3,7 @@ We appreciate your interest in contributing to Pumpkin! This document outlines the guidelines for submitting bug reports, feature suggestions, and code changes. Getting Started -The easisty way to get started is by asking for help in our [discord](https://discord.gg/wT8XjrjKkf) +The easiest way to get started is by asking for help in our [discord](https://discord.gg/wT8XjrjKkf) ### How to Contribute diff --git a/README.md b/README.md index 98b5e06aa..b48027f03 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ and customizable experience. It prioritizes performance and player enjoyment whi ![image](https://github.com/user-attachments/assets/7e2e865e-b150-4675-a2d5-b52f9900378e) -### What Pumpkin wants to achive: +### What Pumpkin wants to achieve: - **Performance**: Leveraging multi-threading for maximum speed and efficiency. - **Compatibility**: Supports the latest Minecraft server version and adheres to vanilla game mechanics. - **Security**: Prioritizes security by preventing known exploits. @@ -83,13 +83,13 @@ Make sure to generate chunks close to (0,0) since that is where the player gets Then run: > [!NOTE] -> This can take a while. Because we enabled heavy optimations for release builds +> This can take a while. Because we enabled heavy optimizations for release builds ``` RUSTFLAGS="-C target-cpu=native" cargo run --release ``` ## Contributions -Contributions are welcome!. See [CONTRIBUTING.md](CONTRIBUTING.md) +Contributions are welcome! See [CONTRIBUTING.md](CONTRIBUTING.md) ## Communication Consider joining our [discord](https://discord.gg/wT8XjrjKkf) to stay up-to-date on events, updates, and connect with other members. diff --git a/pumpkin-inventory/src/player.rs b/pumpkin-inventory/src/player.rs index 4e846999d..08a464e88 100644 --- a/pumpkin-inventory/src/player.rs +++ b/pumpkin-inventory/src/player.rs @@ -21,7 +21,7 @@ impl PlayerInventory { items: [None; 36], armor: [None; 4], offhand: None, - // TODO: What when player spawns in with an diffrent index ? + // TODO: What when player spawns in with an different index ? selected: 0, } } diff --git a/pumpkin-registry/README.md b/pumpkin-registry/README.md index 2202a5d1f..cd0b46392 100644 --- a/pumpkin-registry/README.md +++ b/pumpkin-registry/README.md @@ -1,5 +1,5 @@ ### Pumpkin Registry Here you find all the registry data we have. Registries are repositories of data that contain entries pertaining to certain aspects of the game, such as the world, the player, among others. -Registery data usally send by the Clientbound Registery data Packet. +Registry data usually send by the Clientbound Registry data Packet. A list of Registry entries can be found at https://wiki.vg/Registry_Data \ No newline at end of file diff --git a/pumpkin-registry/src/damage_type.rs b/pumpkin-registry/src/damage_type.rs index 36ccfd5d9..522171aba 100644 --- a/pumpkin-registry/src/damage_type.rs +++ b/pumpkin-registry/src/damage_type.rs @@ -63,7 +63,7 @@ const NAMES: &[&str] = &[ "wither_skull", ]; -pub(super) fn entires() -> Vec> { +pub(super) fn entries() -> Vec> { let items: Vec<_> = NAMES .iter() .map(|name| RegistryEntry { diff --git a/pumpkin-registry/src/lib.rs b/pumpkin-registry/src/lib.rs index 545a54806..2fb7d1a1b 100644 --- a/pumpkin-registry/src/lib.rs +++ b/pumpkin-registry/src/lib.rs @@ -64,7 +64,7 @@ impl Registry { let damage_types = Registry { registry_id: "minecraft:damage_type".to_string(), - registry_entries: damage_type::entires(), + registry_entries: damage_type::entries(), }; let paintings = Registry { registry_id: "minecraft:painting_variant".to_string(), diff --git a/pumpkin-text/src/click.rs b/pumpkin-text/src/click.rs index c1656e28b..4ee02bf52 100644 --- a/pumpkin-text/src/click.rs +++ b/pumpkin-text/src/click.rs @@ -4,7 +4,7 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, PartialEq, Debug, Serialize, Deserialize)] #[serde(tag = "action", content = "value", rename_all = "snake_case")] pub enum ClickEvent { - /// Opens an URL + /// Opens a URL OpenUrl(String), /// Works in signs, but only on the root text component RunCommand(String), diff --git a/pumpkin-text/src/lib.rs b/pumpkin-text/src/lib.rs index 6a6f1ddcb..b4ad287c9 100644 --- a/pumpkin-text/src/lib.rs +++ b/pumpkin-text/src/lib.rs @@ -16,7 +16,7 @@ pub mod style; #[serde(transparent)] pub struct Text(pub Box); -// Fepresents a Text component +// Represents a Text component // Reference: https://wiki.vg/Text_formatting#Text_components #[derive(Clone, Default, Debug, Deserialize)] #[serde(rename_all = "camelCase")] @@ -24,7 +24,7 @@ pub struct TextComponent { /// The actual text #[serde(flatten)] pub content: TextContent, - /// Style of the text. Bold, Italic, unterline, Color... + /// Style of the text. Bold, Italic, underline, Color... /// Also has `ClickEvent #[serde(flatten)] pub style: Style, diff --git a/pumpkin-text/src/style.rs b/pumpkin-text/src/style.rs index ed633c488..07bf5b2f1 100644 --- a/pumpkin-text/src/style.rs +++ b/pumpkin-text/src/style.rs @@ -13,19 +13,19 @@ pub struct Style { #[serde(default, skip_serializing_if = "Option::is_none")] pub bold: Option, /// Whether to render the content in italic. - /// Keep in mind that booleans are representet as bytes in nbt + /// Keep in mind that booleans are represented as bytes in nbt #[serde(default, skip_serializing_if = "Option::is_none")] pub italic: Option, /// Whether to render the content in underlined. - /// Keep in mind that booleans are representet as bytes in nbt + /// Keep in mind that booleans are represented as bytes in nbt #[serde(default, skip_serializing_if = "Option::is_none")] pub underlined: Option, /// Whether to render the content in strikethrough. - /// Keep in mind that booleans are representet as bytes in nbt + /// Keep in mind that booleans are represented as bytes in nbt #[serde(default, skip_serializing_if = "Option::is_none")] pub strikethrough: Option, /// Whether to render the content in obfuscated. - /// Keep in mind that booleans are representet as bytes in nbt + /// Keep in mind that booleans are represented as bytes in nbt #[serde(default, skip_serializing_if = "Option::is_none")] pub obfuscated: Option, /// When the text is shift-clicked by a player, this string is inserted in their chat input. It does not overwrite any existing text the player was writing. This only works in chat messages diff --git a/pumpkin-world/src/vector3.rs b/pumpkin-world/src/vector3.rs index 4e91883af..67bc038bc 100644 --- a/pumpkin-world/src/vector3.rs +++ b/pumpkin-world/src/vector3.rs @@ -14,7 +14,7 @@ impl Vector3 { Vector3 { x, y, z } } - pub fn length_sqared(&self) -> T { + pub fn length_squared(&self) -> T { self.x * self.x + self.y * self.y + self.z * self.z } @@ -45,7 +45,7 @@ impl Vector3 { impl Vector3 { pub fn length(&self) -> T { - self.length_sqared().sqrt() + self.length_squared().sqrt() } pub fn normalize(&self) -> Self { let length = self.length(); diff --git a/pumpkin-world/src/world.rs b/pumpkin-world/src/world.rs index 464ae3668..252413417 100644 --- a/pumpkin-world/src/world.rs +++ b/pumpkin-world/src/world.rs @@ -81,7 +81,7 @@ impl Level { // /// Read one chunk in the world // /// - // /// Do not use this function if reading many chunks is required, since in case those two chunks which are read seperately using `.read_chunk` are in the same region file, it will need to be opened and closed separately for both of them, leading to a performance loss. + // /// Do not use this function if reading many chunks is required, since in case those two chunks which are read separately using `.read_chunk` are in the same region file, it will need to be opened and closed separately for both of them, leading to a performance loss. // pub async fn read_chunk(&self, chunk: (i32, i32)) -> Result { // self.read_chunks(vec![chunk]) // .await diff --git a/pumpkin/src/client/mod.rs b/pumpkin/src/client/mod.rs index a118bea1b..62f2732cf 100644 --- a/pumpkin/src/client/mod.rs +++ b/pumpkin/src/client/mod.rs @@ -65,7 +65,7 @@ pub struct Client { pub protocol_version: i32, pub connection_state: ConnectionState, - pub encrytion: bool, + pub encryption: bool, pub closed: bool, pub token: Rc, pub connection: TcpStream, @@ -89,7 +89,7 @@ impl Client { connection, enc: PacketEncoder::default(), dec: PacketDecoder::default(), - encrytion: true, + encryption: true, closed: false, client_packets_queue: VecDeque::new(), } @@ -105,7 +105,7 @@ impl Client { &mut self, shared_secret: &[u8], // decrypted ) -> Result<(), EncryptionError> { - self.encrytion = true; + self.encryption = true; let crypt_key: [u8; 16] = shared_secret .try_into() .map_err(|_| EncryptionError::SharedWrongLength)?; @@ -379,7 +379,7 @@ impl Client { .unwrap_or_else(|_| self.close()); } _ => { - log::warn!("Cant't kick in {:?} State", self.connection_state) + log::warn!("Can't kick in {:?} State", self.connection_state) } } self.close() diff --git a/pumpkin/src/config/mod.rs b/pumpkin/src/config/mod.rs index ec2adf192..cc47d9772 100644 --- a/pumpkin/src/config/mod.rs +++ b/pumpkin/src/config/mod.rs @@ -15,7 +15,7 @@ pub mod resource_pack; const CURRENT_BASE_VERSION: &str = "1.0.0"; #[derive(Deserialize, Serialize)] -/// The idea is that Pumpkin should very customizable, You can Enable or Disable Features depning on your needs. +/// The idea is that Pumpkin should very customizable, You can Enable or Disable Features depending on your needs. /// This also allows you get some Performance or Resource boosts. /// Important: The Configuration should match Vanilla by default pub struct AdvancedConfiguration { @@ -182,7 +182,7 @@ impl AdvancedConfiguration { if path.as_ref().exists() { let toml = std::fs::read_to_string(path).expect("Couldn't read configuration"); let config: AdvancedConfiguration = - toml::from_str(toml.as_str()).expect("Couldn't parse features.toml, Proberbly old config, Replacing with a new one or just delete it"); + toml::from_str(toml.as_str()).expect("Couldn't parse features.toml, Probably old config, Replacing with a new one or just delete it"); config.validate(); config } else { @@ -202,7 +202,7 @@ impl BasicConfiguration { pub fn load>(path: P) -> BasicConfiguration { if path.as_ref().exists() { let toml = std::fs::read_to_string(path).expect("Couldn't read configuration"); - let config: BasicConfiguration = toml::from_str(toml.as_str()).expect("Couldn't parse configuration.toml, Proberbly old config, Replacing with a new one or just delete it"); + let config: BasicConfiguration = toml::from_str(toml.as_str()).expect("Couldn't parse configuration.toml, Probably old config, Replacing with a new one or just delete it"); config.validate(); config } else { @@ -219,7 +219,7 @@ impl BasicConfiguration { self.config_version, CURRENT_BASE_VERSION, "Config version does not match used Config version. Please update your config" ); - assert!(self.view_distance >= 2, "View distance must be atleast 2"); + assert!(self.view_distance >= 2, "View distance must be at least 2"); assert!( self.view_distance <= 32, "View distance must be less than 32" diff --git a/pumpkin/src/config/resource_pack.rs b/pumpkin/src/config/resource_pack.rs index f3479240e..795595ada 100644 --- a/pumpkin/src/config/resource_pack.rs +++ b/pumpkin/src/config/resource_pack.rs @@ -7,7 +7,7 @@ pub struct ResourcePackConfig { pub resource_pack_url: String, /// The SHA1 hash (40) of the resource pack. pub resource_pack_sha1: String, - /// Custom propmt Text component, Leave blank for none + /// Custom prompt Text component, Leave blank for none pub prompt_message: String, /// Will force the Player to accept the resource pack pub force: bool,