aboutsummaryrefslogtreecommitdiff
path: root/azalea-physics/src/lib.rs
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2025-02-22 23:01:54 +0000
committermat <git@matdoes.dev>2025-02-22 23:01:54 +0000
commit34f53baf85fb5c7163ec5d71a8ab9d45d3f271b6 (patch)
tree7920fec1203e8e96463a142f5f6da6164e76e684 /azalea-physics/src/lib.rs
parentbdd2fc91e11e2896d8e1c7046df247e1075bd40d (diff)
downloadazalea-drasl-34f53baf85fb5c7163ec5d71a8ab9d45d3f271b6.tar.xz
update to rust edition 2024
Diffstat (limited to 'azalea-physics/src/lib.rs')
-rw-r--r--azalea-physics/src/lib.rs14
1 files changed, 5 insertions, 9 deletions
diff --git a/azalea-physics/src/lib.rs b/azalea-physics/src/lib.rs
index c626dcdf..0541042c 100644
--- a/azalea-physics/src/lib.rs
+++ b/azalea-physics/src/lib.rs
@@ -8,15 +8,15 @@ pub mod travel;
use std::collections::HashSet;
-use azalea_block::{fluid_state::FluidState, properties, Block, BlockState};
+use azalea_block::{Block, BlockState, fluid_state::FluidState, properties};
use azalea_core::{
math,
position::{BlockPos, Vec3},
tick::GameTick,
};
use azalea_entity::{
- metadata::Sprinting, move_relative, Attributes, InLoadedChunk, Jumping, LocalEntity,
- LookDirection, OnClimbable, Physics, Pose, Position,
+ Attributes, InLoadedChunk, Jumping, LocalEntity, LookDirection, OnClimbable, Physics, Pose,
+ Position, metadata::Sprinting, move_relative,
};
use azalea_world::{Instance, InstanceContainer, InstanceName};
use bevy_app::{App, Plugin};
@@ -27,7 +27,7 @@ use bevy_ecs::{
world::Mut,
};
use clip::box_traverse_blocks;
-use collision::{move_colliding, BlockWithShape, MoverType, VoxelShape, BLOCK_SHAPE};
+use collision::{BLOCK_SHAPE, BlockWithShape, MoverType, VoxelShape, move_colliding};
/// A Bevy [`SystemSet`] for running physics that makes entities do things.
#[derive(SystemSet, Debug, Hash, PartialEq, Eq, Clone)]
@@ -476,11 +476,7 @@ fn get_friction_influenced_speed(
speed * (0.216f32 / (friction * friction * friction))
} else {
// entity.flying_speed
- if is_sprinting {
- 0.025999999f32
- } else {
- 0.02
- }
+ if is_sprinting { 0.025999999f32 } else { 0.02 }
}
}