aboutsummaryrefslogtreecommitdiff
path: root/azalea-entity/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'azalea-entity/src/lib.rs')
-rw-r--r--azalea-entity/src/lib.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/azalea-entity/src/lib.rs b/azalea-entity/src/lib.rs
index 340b6f25..18e9e1a1 100644
--- a/azalea-entity/src/lib.rs
+++ b/azalea-entity/src/lib.rs
@@ -50,10 +50,10 @@ pub fn move_relative(
pub fn input_vector(direction: LookDirection, speed: f32, acceleration: Vec3) -> Vec3 {
let distance = acceleration.length_squared();
- if distance < 1.0E-7 {
+ if distance < 1.0e-7 {
return Vec3::ZERO;
}
- let acceleration = if distance > 1.0 {
+ let acceleration = if distance > 1. {
acceleration.normalize()
} else {
acceleration
@@ -492,6 +492,7 @@ pub fn default_attributes(_entity_kind: EntityKind) -> Attributes {
// entities have different defaults
Attributes {
speed: AttributeInstance::new(0.1),
+ sneaking_speed: AttributeInstance::new(0.3),
attack_speed: AttributeInstance::new(4.0),
water_movement_efficiency: AttributeInstance::new(0.0),
block_interaction_range: AttributeInstance::new(4.5),