diff --git a/Cargo.toml b/Cargo.toml index 79767e8e3..d32f8e1a0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -36,7 +36,7 @@ rayon = "1.10.0" parking_lot = "0.12.3" crossbeam = "0.8.4" -uuid = { version = "1.10.0", features = ["serde", "v3", "v4"] } +uuid = { version = "1.11.0", features = ["serde", "v3", "v4"] } derive_more = { version = "1.0.0", features = ["full"] } serde = { version = "1.0", features = ["derive"] } diff --git a/README.md b/README.md index b5f78af75..106d8426e 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ and customizable experience. It prioritizes performance and player enjoyment whi - **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. +- **Security**: Prioritizes security by preventing known security exploits. - **Flexibility**: Highly configurable, with the ability to disable unnecessary features. - **Extensibility**: Provides a foundation for plugin development. @@ -48,6 +48,7 @@ and customizable experience. It prioritizes performance and player enjoyment whi - [x] Entity Spawning - [x] Chunk Loading - [x] Chunk Generation + - [x] Scoreboard - [ ] World Borders - [ ] World Saving - Player diff --git a/docs/about/introduction.md b/docs/about/introduction.md index 8f4c216b2..11703d96c 100644 --- a/docs/about/introduction.md +++ b/docs/about/introduction.md @@ -9,7 +9,7 @@ and customizable experience. It prioritizes performance and player enjoyment whi - **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. +- **Security**: Prioritizes security by preventing known security exploits. - **Flexibility**: Highly configurable, with the ability to disable unnecessary features. - **Extensibility**: Provides a foundation for plugin development. @@ -20,3 +20,13 @@ and customizable experience. It prioritizes performance and player enjoyment whi > [!IMPORTANT] > Pumpkin is currently under heavy development. Check out our [Github Project](https://github.com/users/Snowiiii/projects/12/views/3) to see current progress + +## Vanilla + +Pumpkin is designed to replicate vanilla Minecraft logic as closely as possible, +ensuring a familiar gameplay experience. However, we've also added new features to enhance your gameplay. + +### Redstone + +Unlike other forks that may compromise vanilla redstone mechanics, Pumpkin maintains the original redstone behavior. +If you're looking to experiment with redstone modifications or seek performance optimizations, you have the flexibility to do so through our configurable settings. diff --git a/pumpkin-protocol/src/client/play/c_system_chat_message.rs b/pumpkin-protocol/src/client/play/c_system_chat_message.rs index 2751b40c7..07c627178 100644 --- a/pumpkin-protocol/src/client/play/c_system_chat_message.rs +++ b/pumpkin-protocol/src/client/play/c_system_chat_message.rs @@ -5,12 +5,12 @@ use serde::Serialize; #[derive(Serialize)] #[packet(0x6C)] pub struct CSystemChatMessage<'a> { - content: TextComponent<'a>, + content: &'a TextComponent<'a>, overlay: bool, } impl<'a> CSystemChatMessage<'a> { - pub fn new(content: TextComponent<'a>, overlay: bool) -> Self { + pub fn new(content: &'a TextComponent<'a>, overlay: bool) -> Self { Self { content, overlay } } } diff --git a/pumpkin-world/Cargo.toml b/pumpkin-world/Cargo.toml index c3eed26cb..311438a0b 100644 --- a/pumpkin-world/Cargo.toml +++ b/pumpkin-world/Cargo.toml @@ -15,7 +15,6 @@ itertools.workspace = true thiserror = "1.0" futures = "0.3" - # Compression flate2 = "1.0" lz4 = "1.11.1" diff --git a/pumpkin/src/commands/cmd_gamemode.rs b/pumpkin/src/commands/cmd_gamemode.rs index 4fe656e84..f86bc9771 100644 --- a/pumpkin/src/commands/cmd_gamemode.rs +++ b/pumpkin/src/commands/cmd_gamemode.rs @@ -74,14 +74,14 @@ pub fn init_command_tree<'a>() -> CommandTree<'a> { return if let Player(target) = sender { if target.gamemode.load() == gamemode { - target.send_system_message(TextComponent::text(&format!( + target.send_system_message(&TextComponent::text(&format!( "You already in {:?} gamemode", gamemode ))); } else { // TODO target.set_gamemode(gamemode); - target.send_system_message(TextComponent::text(&format!( + target.send_system_message(&TextComponent::text(&format!( "Game mode was set to {:?}", gamemode ))); @@ -98,16 +98,16 @@ pub fn init_command_tree<'a>() -> CommandTree<'a> { let target = parse_arg_player(sender, server, ARG_TARGET, args)?; if target.gamemode.load() == gamemode { - target.send_system_message(TextComponent::text(&format!( - "You already in {:?} gamemode", - gamemode + sender.send_message(TextComponent::text(&format!( + "{} is already in {:?} gamemode", + target.gameprofile.name, gamemode ))); } else { // TODO target.set_gamemode(gamemode); - target.send_system_message(TextComponent::text(&format!( - "Game mode was set to {:?}", - gamemode + sender.send_message(TextComponent::text(&format!( + "{}'s Game mode was set to {:?}", + target.gameprofile.name, gamemode ))); } diff --git a/pumpkin/src/commands/mod.rs b/pumpkin/src/commands/mod.rs index 64825aeba..84ddfdd68 100644 --- a/pumpkin/src/commands/mod.rs +++ b/pumpkin/src/commands/mod.rs @@ -31,7 +31,7 @@ impl<'a> CommandSender<'a> { match self { // TODO: add color and stuff to console CommandSender::Console => log::info!("{}", text.to_pretty_console()), - CommandSender::Player(c) => c.send_system_message(text), + CommandSender::Player(c) => c.send_system_message(&text), CommandSender::Rcon(s) => s.push(text.to_pretty_console()), } } diff --git a/pumpkin/src/entity/player.rs b/pumpkin/src/entity/player.rs index 5ec86c950..bb2b15ece 100644 --- a/pumpkin/src/entity/player.rs +++ b/pumpkin/src/entity/player.rs @@ -267,7 +267,7 @@ impl Player { )); } - pub fn send_system_message(&self, text: TextComponent) { + pub fn send_system_message(&self, text: &TextComponent) { self.client .send_packet(&CSystemChatMessage::new(text, false)); }