cargo fmt

This commit is contained in:
Ryan 2022-09-04 22:21:24 -07:00
parent 58fce9f3aa
commit 30e05bb373
7 changed files with 18 additions and 17 deletions

View file

@ -3,7 +3,9 @@ use std::sync::atomic::{AtomicUsize, Ordering};
use log::LevelFilter;
use valence::block::{BlockPos, BlockState};
use valence::client::{ClientEvent, ClientId, GameMode, InteractWithEntityKind, default_client_event};
use valence::client::{
default_client_event, ClientEvent, ClientId, GameMode, InteractWithEntityKind,
};
use valence::config::{Config, ServerListPing};
use valence::dimension::DimensionId;
use valence::entity::{EntityEvent, EntityId, EntityKind};

View file

@ -7,7 +7,7 @@ use num::Integer;
use rayon::iter::{IndexedParallelIterator, IntoParallelRefMutIterator, ParallelIterator};
use valence::biome::Biome;
use valence::block::BlockState;
use valence::client::{ClientEvent, default_client_event};
use valence::client::{default_client_event, ClientEvent};
use valence::config::{Config, ServerListPing};
use valence::dimension::{Dimension, DimensionId};
use valence::entity::types::Pose;
@ -49,7 +49,7 @@ struct ServerState {
#[derive(Default)]
struct ClientState {
entity_id: EntityId
entity_id: EntityId,
}
const MAX_PLAYERS: usize = 10;

View file

@ -5,7 +5,7 @@ use std::sync::atomic::{AtomicUsize, Ordering};
use log::LevelFilter;
use valence::async_trait;
use valence::block::{BlockPos, BlockState};
use valence::client::{GameMode, default_client_event};
use valence::client::{default_client_event, GameMode};
use valence::config::{Config, ServerListPing};
use valence::dimension::DimensionId;
use valence::entity::{EntityId, EntityKind};

View file

@ -4,7 +4,7 @@ use std::sync::atomic::{AtomicUsize, Ordering};
use log::LevelFilter;
use valence::async_trait;
use valence::block::{BlockPos, BlockState};
use valence::client::{GameMode, default_client_event};
use valence::client::{default_client_event, GameMode};
use valence::config::{Config, ServerListPing};
use valence::dimension::DimensionId;
use valence::entity::{EntityId, EntityKind, TrackedData};

View file

@ -7,7 +7,7 @@ use rayon::iter::ParallelIterator;
use valence::async_trait;
use valence::block::{BlockState, PropName, PropValue};
use valence::chunk::ChunkPos;
use valence::client::{GameMode, default_client_event};
use valence::client::{default_client_event, GameMode};
use valence::config::{Config, ServerListPing};
use valence::dimension::DimensionId;
use valence::entity::{EntityId, EntityKind};

View file

@ -2,16 +2,15 @@ use std::time::Duration;
use vek::Vec3;
use super::Client;
use crate::block_pos::BlockPos;
use crate::config::Config;
use crate::entity::types::Pose;
use crate::entity::{EntityId, EntityEvent, Entity, TrackedData};
use crate::entity::{Entity, EntityEvent, EntityId, TrackedData};
use crate::protocol::packets::c2s::play::BlockFace;
pub use crate::protocol::packets::c2s::play::{ChatMode, DisplayedSkinParts, Hand, MainHand};
pub use crate::protocol::packets::s2c::play::GameMode;
use super::Client;
/// Represents an action performed by a client.
///
/// Client events can be obtained from
@ -137,7 +136,8 @@ pub enum DiggingStatus {
Finish,
}
/// Standard client event handler that stores various things a player may do. Used to avoid extra boilerplate.
/// Standard client event handler that stores various things a player may do.
/// Used to avoid extra boilerplate.
pub fn default_client_event<C: Config>(
client: &mut Client<C>,
entity: &mut Entity<C>,

View file

@ -65,7 +65,6 @@
html_logo_url = "https://raw.githubusercontent.com/rj00a/valence/main/assets/logo.svg",
html_favicon_url = "https://raw.githubusercontent.com/rj00a/valence/main/assets/logo.svg"
)]
#![forbid(unsafe_code)]
#![warn(
trivial_casts,