Fix some minor typos
This commit is contained in:
parent
43fbb6a68d
commit
1a21290e0f
@ -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
|
||||
|
||||
|
||||
@ -14,7 +14,7 @@ and customizable experience. It prioritizes performance and player enjoyment whi
|
||||
|
||||

|
||||
|
||||
### 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.
|
||||
|
||||
@ -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,
|
||||
}
|
||||
}
|
||||
|
||||
@ -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
|
||||
@ -63,7 +63,7 @@ const NAMES: &[&str] = &[
|
||||
"wither_skull",
|
||||
];
|
||||
|
||||
pub(super) fn entires() -> Vec<RegistryEntry<'static>> {
|
||||
pub(super) fn entries() -> Vec<RegistryEntry<'static>> {
|
||||
let items: Vec<_> = NAMES
|
||||
.iter()
|
||||
.map(|name| RegistryEntry {
|
||||
|
||||
@ -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(),
|
||||
|
||||
@ -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),
|
||||
|
||||
@ -16,7 +16,7 @@ pub mod style;
|
||||
#[serde(transparent)]
|
||||
pub struct Text(pub Box<TextComponent>);
|
||||
|
||||
// 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,
|
||||
|
||||
@ -13,19 +13,19 @@ pub struct Style {
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
pub bold: Option<u8>,
|
||||
/// 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<u8>,
|
||||
/// 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<u8>,
|
||||
/// 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<u8>,
|
||||
/// 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<u8>,
|
||||
/// 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
|
||||
|
||||
@ -14,7 +14,7 @@ impl<T: Math + Copy> Vector3<T> {
|
||||
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<T: Math + Copy> Vector3<T> {
|
||||
|
||||
impl<T: Math + Copy + Float> Vector3<T> {
|
||||
pub fn length(&self) -> T {
|
||||
self.length_sqared().sqrt()
|
||||
self.length_squared().sqrt()
|
||||
}
|
||||
pub fn normalize(&self) -> Self {
|
||||
let length = self.length();
|
||||
|
||||
@ -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<ChunkData, WorldError> {
|
||||
// self.read_chunks(vec![chunk])
|
||||
// .await
|
||||
|
||||
@ -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<Token>,
|
||||
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()
|
||||
|
||||
@ -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<P: AsRef<Path>>(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"
|
||||
|
||||
@ -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,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user