diff options
| author | mat <git@matdoes.dev> | 2024-10-26 05:29:26 +0000 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2024-10-26 05:29:26 +0000 |
| commit | 6b0fe5bf638079d535e70c3c91e78fe35a5d2a2f (patch) | |
| tree | 3b65d2984a0cffbe5acb3d44d7e3b8b145c32f95 /azalea-entity/src | |
| parent | b762575db61cf775d603e11eb2bd27ae13bdc4e9 (diff) | |
| download | azalea-drasl-6b0fe5bf638079d535e70c3c91e78fe35a5d2a2f.tar.xz | |
group imports with rustfmt
Diffstat (limited to 'azalea-entity/src')
| -rwxr-xr-x | azalea-entity/src/data.rs | 3 | ||||
| -rw-r--r-- | azalea-entity/src/lib.rs | 11 | ||||
| -rw-r--r-- | azalea-entity/src/metadata.rs | 12 | ||||
| -rw-r--r-- | azalea-entity/src/plugin/indexing.rs | 6 | ||||
| -rw-r--r-- | azalea-entity/src/plugin/mod.rs | 5 |
5 files changed, 19 insertions, 18 deletions
diff --git a/azalea-entity/src/data.rs b/azalea-entity/src/data.rs index 45c761e7..533bb49a 100755 --- a/azalea-entity/src/data.rs +++ b/azalea-entity/src/data.rs @@ -1,5 +1,7 @@ //! Define some types needed for entity metadata. +use std::io::{Cursor, Write}; + use azalea_buf::{ BufReadError, McBuf, McBufReadable, McBufVarReadable, McBufVarWritable, McBufWritable, }; @@ -13,7 +15,6 @@ use bevy_ecs::component::Component; use derive_more::Deref; use enum_as_inner::EnumAsInner; use nohash_hasher::IntSet; -use std::io::{Cursor, Write}; use uuid::Uuid; use crate::particle::Particle; diff --git a/azalea-entity/src/lib.rs b/azalea-entity/src/lib.rs index 8761fa24..c009198c 100644 --- a/azalea-entity/src/lib.rs +++ b/azalea-entity/src/lib.rs @@ -10,7 +10,11 @@ pub mod mining; pub mod particle; mod plugin; -use self::attributes::AttributeInstance; +use std::{ + fmt::Debug, + hash::{Hash, Hasher}, +}; + pub use attributes::Attributes; use azalea_block::BlockState; use azalea_core::{ @@ -25,12 +29,9 @@ pub use data::*; use derive_more::{Deref, DerefMut}; pub use dimensions::EntityDimensions; use plugin::indexing::EntityChunkPos; -use std::{ - fmt::Debug, - hash::{Hash, Hasher}, -}; use uuid::Uuid; +use self::attributes::AttributeInstance; pub use crate::plugin::*; pub fn move_relative( diff --git a/azalea-entity/src/metadata.rs b/azalea-entity/src/metadata.rs index 74bc571d..2a6f996e 100644 --- a/azalea-entity/src/metadata.rs +++ b/azalea-entity/src/metadata.rs @@ -3,12 +3,6 @@ // This file is generated from codegen/lib/code/entity.py. // Don't change it manually! -use crate::particle::Particle; - -use super::{ - ArmadilloStateKind, EntityDataItem, EntityDataValue, OptionalUnsignedInt, Pose, Quaternion, - Rotations, SnifferState, VillagerData, -}; use azalea_chat::FormattedText; use azalea_core::{ direction::Direction, @@ -20,6 +14,12 @@ use derive_more::{Deref, DerefMut}; use thiserror::Error; use uuid::Uuid; +use super::{ + ArmadilloStateKind, EntityDataItem, EntityDataValue, OptionalUnsignedInt, Pose, Quaternion, + Rotations, SnifferState, VillagerData, +}; +use crate::particle::Particle; + #[derive(Error, Debug)] pub enum UpdateMetadataError { #[error("Wrong type ({0:?})")] diff --git a/azalea-entity/src/plugin/indexing.rs b/azalea-entity/src/plugin/indexing.rs index f04f5ef2..c4879c4f 100644 --- a/azalea-entity/src/plugin/indexing.rs +++ b/azalea-entity/src/plugin/indexing.rs @@ -1,5 +1,7 @@ //! Stuff related to entity indexes and keeping track of entities in the world. +use std::{collections::HashMap, fmt::Debug}; + use azalea_core::position::ChunkPos; use azalea_world::{Instance, InstanceContainer, InstanceName, MinecraftEntityId}; use bevy_ecs::{ @@ -10,13 +12,11 @@ use bevy_ecs::{ }; use derive_more::{Deref, DerefMut}; use nohash_hasher::IntMap; -use std::{collections::HashMap, fmt::Debug}; use tracing::{debug, warn}; use uuid::Uuid; -use crate::{EntityUuid, Position}; - use super::LoadedBy; +use crate::{EntityUuid, Position}; #[derive(Resource, Default)] pub struct EntityUuidIndex { diff --git a/azalea-entity/src/plugin/mod.rs b/azalea-entity/src/plugin/mod.rs index de18cbd3..67763484 100644 --- a/azalea-entity/src/plugin/mod.rs +++ b/azalea-entity/src/plugin/mod.rs @@ -9,6 +9,8 @@ use azalea_world::{InstanceContainer, InstanceName, MinecraftEntityId}; use bevy_app::{App, Plugin, PreUpdate, Update}; use bevy_ecs::prelude::*; use derive_more::{Deref, DerefMut}; +use indexing::EntityUuidIndex; +pub use relative_updates::RelativeEntityUpdate; use tracing::debug; use crate::{ @@ -16,9 +18,6 @@ use crate::{ Physics, Position, }; -use indexing::EntityUuidIndex; -pub use relative_updates::RelativeEntityUpdate; - /// A Bevy [`SystemSet`] for various types of entity updates. #[derive(SystemSet, Debug, Hash, Eq, PartialEq, Clone)] pub enum EntityUpdateSet { |
