diff --git a/pumpkin-entity/src/entity_type.rs b/pumpkin-entity/src/entity_type.rs index 4062e73a..e5cbc49d 100644 --- a/pumpkin-entity/src/entity_type.rs +++ b/pumpkin-entity/src/entity_type.rs @@ -1,6 +1,6 @@ use num_derive::ToPrimitive; -// todo +// TODO #[derive(ToPrimitive, Clone)] pub enum EntityType { Zombie = 124, diff --git a/pumpkin/src/client/authentication.rs b/pumpkin/src/client/authentication.rs index dcebe09a..eaff1611 100644 --- a/pumpkin/src/client/authentication.rs +++ b/pumpkin/src/client/authentication.rs @@ -80,7 +80,7 @@ pub fn authenticate( } pub fn unpack_textures(property: Property, config: &TextureConfig) { - // todo: no unwrap + // TODO: no unwrap let from64 = general_purpose::STANDARD.decode(property.value).unwrap(); let textures: ProfileTextures = serde_json::from_slice(&from64).unwrap(); dbg!(&textures); diff --git a/pumpkin/src/client/client_packet.rs b/pumpkin/src/client/client_packet.rs index a62286c4..8a82ca91 100644 --- a/pumpkin/src/client/client_packet.rs +++ b/pumpkin/src/client/client_packet.rs @@ -48,10 +48,10 @@ impl Client { } pub fn handle_login_start(&mut self, server: &mut Server, login_start: SLoginStart) { - // todo: do basic name validation + // TODO: do basic name validation dbg!("login start"); // default game profile, when no online mode - // todo: make offline uuid + // TODO: make offline uuid self.gameprofile = Some(GameProfile { id: login_start.uuid, name: login_start.name, @@ -59,7 +59,7 @@ impl Client { profile_actions: None, }); - // todo: check config for encryption + // TODO: check config for encryption let verify_token: [u8; 4] = rand::random(); let public_key_der = &server.public_key_der; let packet = CEncryptionRequest::new( diff --git a/pumpkin/src/client/mod.rs b/pumpkin/src/client/mod.rs index 387f1d49..e0359722 100644 --- a/pumpkin/src/client/mod.rs +++ b/pumpkin/src/client/mod.rs @@ -136,7 +136,7 @@ impl Client { pub fn teleport(&mut self, x: f64, y: f64, z: f64, yaw: f32, pitch: f32) { assert!(self.is_player()); - // todo + // TODO let id = 0; let player = self.player.as_mut().unwrap(); let entity = &mut player.entity; diff --git a/pumpkin/src/client/player_packet.rs b/pumpkin/src/client/player_packet.rs index 1850fd34..34384b9a 100644 --- a/pumpkin/src/client/player_packet.rs +++ b/pumpkin/src/client/player_packet.rs @@ -49,7 +49,7 @@ impl Client { entity.x = position.x; entity.y = position.feet_y; entity.z = position.z; - // todo: teleport when moving > 8 block + // TODO: teleport when moving > 8 block // send new position to all other players let on_ground = player.on_ground; diff --git a/pumpkin/src/commands/gamemode.rs b/pumpkin/src/commands/gamemode.rs index 5cc26b34..f2134598 100644 --- a/pumpkin/src/commands/gamemode.rs +++ b/pumpkin/src/commands/gamemode.rs @@ -18,7 +18,7 @@ impl<'a> Command<'a> for GamemodeCommand { let args: Vec<&str> = command.split_whitespace().collect(); if args.len() != 2 { - // todo red + // TODO: red player.send_system_message("Usage: /gamemode ".into()); return; } @@ -30,13 +30,13 @@ impl<'a> Command<'a> for GamemodeCommand { player.send_system_message(format!("Set own game mode to {mode_str}").into()); } Err(_) => { - // todo red + // TODO: red player.send_system_message("Invalid gamemode".into()); } } } - // todo: support console, (name required) + // TODO: support console, (name required) fn player_required() -> bool { true } diff --git a/pumpkin/src/commands/mod.rs b/pumpkin/src/commands/mod.rs index 9c97c0f2..bc6160f3 100644 --- a/pumpkin/src/commands/mod.rs +++ b/pumpkin/src/commands/mod.rs @@ -29,7 +29,7 @@ pub enum CommandSender<'a> { impl<'a> CommandSender<'a> { pub fn send_message(&mut self, text: TextComponent) { match self { - // todo: add color and stuff to console + // TODO: add color and stuff to console CommandSender::Console => log::info!("{}", text.text), CommandSender::Player(c) => c.send_system_message(text), } @@ -66,6 +66,6 @@ pub fn handle_command(sender: &mut CommandSender, command: String) { GamemodeCommand::on_execute(sender, command); return; } - // todo: red color + // TODO: red color sender.send_message("Command not Found".into()); } diff --git a/pumpkin/src/config/mod.rs b/pumpkin/src/config/mod.rs index 3430a233..cd515490 100644 --- a/pumpkin/src/config/mod.rs +++ b/pumpkin/src/config/mod.rs @@ -23,7 +23,7 @@ pub struct AdvancedConfiguration { pub struct Commands { /// Are commands from the Console accepted ? pub use_console: bool, - // todo commands... + // TODO: commands... } impl Default for Commands { diff --git a/pumpkin/src/server.rs b/pumpkin/src/server.rs index 399d6854..c13c1b3e 100644 --- a/pumpkin/src/server.rs +++ b/pumpkin/src/server.rs @@ -50,8 +50,8 @@ pub struct Server { pub current_clients: HashMap, Rc>>, - // todo replace with HashMap - entity_id: AtomicI32, // todo: place this into every world + // TODO: replace with HashMap + entity_id: AtomicI32, // TODO: place this into every world pub base_config: BasicConfiguration, pub advanced_config: AdvancedConfiguration, @@ -66,7 +66,7 @@ impl Server { .expect("Failed to parse Status response into JSON"); let cached_server_brand = Self::build_brand(); - // todo, only create when needed + // TODO: only create when needed let (public_key, private_key) = Self::generate_keys(); let public_key_der = rsa_der::public_key_to_der( @@ -100,7 +100,7 @@ impl Server { // Returns Tokens to remove pub fn poll(&mut self, client: &mut Client, _poll: &Poll, event: &Event) { - // todo, Poll players in every world + // TODO: Poll players in every world client.poll(self, event) } @@ -120,7 +120,7 @@ impl Server { } // here is where the magic happens - // todo: do this in a world + // TODO: do this in a world pub fn spawn_player(&mut self, client: &mut Client) { // This code follows the vanilla packet order let entity_id = self.new_entity_id(); @@ -134,8 +134,8 @@ impl Server { self.base_config.hardcore, vec!["minecraft:overworld".into()], self.base_config.max_players.into(), - self.base_config.view_distance.into(), // view distance todo - self.base_config.simulation_distance.into(), // sim view dinstance todo + self.base_config.view_distance.into(), // TODO: view distance + self.base_config.simulation_distance.into(), // TODO: sim view dinstance false, false, false, @@ -290,7 +290,7 @@ impl Server { } } - // todo: do this in a world + // TODO: do this in a world fn _spawn_test_chunk(client: &mut Client) { let test_chunk = TestChunk::new(); client.send_packet(CChunkDataUpdateLight::new(