diff options
| author | mat <git@matdoes.dev> | 2025-12-15 11:14:40 +0930 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2025-12-15 11:14:40 +0930 |
| commit | dcbd690f21665e22ea250024a1aa85dec34e6c9e (patch) | |
| tree | 411c76eb92ca1cfe284e56f47bc0abd4079a3364 /azalea-physics/src | |
| parent | b0a2a809331b0f781517649857d31e0aec67d300 (diff) | |
| download | azalea-drasl-dcbd690f21665e22ea250024a1aa85dec34e6c9e.tar.xz | |
sort derives with cargo sort-derives
might add to ci later, unsure how to do it without adding significant friction for contributors though
Diffstat (limited to 'azalea-physics/src')
| -rw-r--r-- | azalea-physics/src/clip.rs | 6 | ||||
| -rw-r--r-- | azalea-physics/src/collision/discrete_voxel_shape.rs | 4 | ||||
| -rw-r--r-- | azalea-physics/src/collision/mod.rs | 2 | ||||
| -rw-r--r-- | azalea-physics/src/collision/shape.rs | 6 | ||||
| -rw-r--r-- | azalea-physics/src/lib.rs | 2 | ||||
| -rw-r--r-- | azalea-physics/src/local_player.rs | 4 |
6 files changed, 12 insertions, 12 deletions
diff --git a/azalea-physics/src/clip.rs b/azalea-physics/src/clip.rs index 625a709e..cabcd2a6 100644 --- a/azalea-physics/src/clip.rs +++ b/azalea-physics/src/clip.rs @@ -16,7 +16,7 @@ use azalea_world::ChunkStorage; use crate::collision::{BlockWithShape, EMPTY_SHAPE, VoxelShape}; -#[derive(Debug, Clone)] +#[derive(Clone, Debug)] pub struct ClipContext { pub from: Vec3, pub to: Vec3, @@ -58,7 +58,7 @@ impl ClipContext { } } -#[derive(Debug, Copy, Clone)] +#[derive(Clone, Copy, Debug)] pub enum BlockShapeType { /// The shape that's used for collision. Collider, @@ -71,7 +71,7 @@ pub enum BlockShapeType { Visual, FallDamageResetting, } -#[derive(Debug, Copy, Clone)] +#[derive(Clone, Copy, Debug)] pub enum FluidPickType { None, SourceOnly, diff --git a/azalea-physics/src/collision/discrete_voxel_shape.rs b/azalea-physics/src/collision/discrete_voxel_shape.rs index 1d8de4db..a9789684 100644 --- a/azalea-physics/src/collision/discrete_voxel_shape.rs +++ b/azalea-physics/src/collision/discrete_voxel_shape.rs @@ -10,7 +10,7 @@ use super::mergers::IndexMerger; pub trait IntLineConsumer = FnMut(u32, u32, u32, u32, u32, u32); -#[derive(Clone, PartialEq, Eq, Debug)] +#[derive(Clone, Debug, Eq, PartialEq)] pub enum DiscreteVoxelShape { BitSet(BitSetDiscreteVoxelShape), } @@ -77,7 +77,7 @@ impl DiscreteVoxelShape { } } -#[derive(Default, Clone, PartialEq, Eq, Debug)] +#[derive(Clone, Debug, Default, Eq, PartialEq)] pub struct BitSetDiscreteVoxelShape { x_size: u32, y_size: u32, diff --git a/azalea-physics/src/collision/mod.rs b/azalea-physics/src/collision/mod.rs index 6c622d40..f720fdba 100644 --- a/azalea-physics/src/collision/mod.rs +++ b/azalea-physics/src/collision/mod.rs @@ -32,7 +32,7 @@ use crate::{ collision::entity_collisions::AabbQuery, local_player::PhysicsState, travel::no_collision, }; -#[derive(Debug, Clone, Copy, PartialEq, Eq)] +#[derive(Clone, Copy, Debug, Eq, PartialEq)] pub enum MoverType { Own, Player, diff --git a/azalea-physics/src/collision/shape.rs b/azalea-physics/src/collision/shape.rs index fedc8a79..36dedb85 100644 --- a/azalea-physics/src/collision/shape.rs +++ b/azalea-physics/src/collision/shape.rs @@ -319,7 +319,7 @@ impl Shapes { } } -#[derive(Clone, PartialEq, Debug)] +#[derive(Clone, Debug, PartialEq)] pub enum VoxelShape { Array(ArrayVoxelShape), Cube(CubeVoxelShape), @@ -587,7 +587,7 @@ impl From<Aabb> for VoxelShape { } } -#[derive(Clone, PartialEq, Debug)] +#[derive(Clone, Debug, PartialEq)] pub struct ArrayVoxelShape { shape: DiscreteVoxelShape, // TODO: check where faces is used in minecraft @@ -599,7 +599,7 @@ pub struct ArrayVoxelShape { pub zs: Vec<f64>, } -#[derive(Clone, PartialEq, Debug)] +#[derive(Clone, Debug, PartialEq)] pub struct CubeVoxelShape { shape: DiscreteVoxelShape, // TODO: check where faces is used in minecraft diff --git a/azalea-physics/src/lib.rs b/azalea-physics/src/lib.rs index 663c60db..90c89b16 100644 --- a/azalea-physics/src/lib.rs +++ b/azalea-physics/src/lib.rs @@ -30,7 +30,7 @@ use collision::{BLOCK_SHAPE, BlockWithShape, VoxelShape, move_colliding}; use crate::collision::{MoveCtx, entity_collisions::update_last_bounding_box}; /// A Bevy [`SystemSet`] for running physics that makes entities do things. -#[derive(SystemSet, Debug, Hash, PartialEq, Eq, Clone)] +#[derive(Clone, Debug, Eq, Hash, PartialEq, SystemSet)] pub struct PhysicsSystems; pub struct PhysicsPlugin; diff --git a/azalea-physics/src/local_player.rs b/azalea-physics/src/local_player.rs index f2f213d8..75bbbfb9 100644 --- a/azalea-physics/src/local_player.rs +++ b/azalea-physics/src/local_player.rs @@ -6,7 +6,7 @@ use bevy_ecs::component::Component; /// Usually only present for [`LocalEntity`]s. /// /// [`LocalEntity`]: azalea_entity::LocalEntity -#[derive(Default, Component, Clone)] +#[derive(Clone, Component, Default)] pub struct PhysicsState { /// Minecraft only sends a movement packet either after 20 ticks or if the /// player moved enough. This is that tick counter. @@ -35,7 +35,7 @@ pub struct PhysicsState { /// A direction that a player can walk in, including none. /// /// Superset of [`SprintDirection`]. -#[derive(Clone, Copy, Debug, Default, PartialEq, Eq)] +#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] pub enum WalkDirection { #[default] None, |
