mirror of
https://github.com/Pumpkin-MC/Pumpkin.git
synced 2026-08-31 08:22:33 +00:00
* Reset fall distance for entities in water or powder snow * Fixed formatting * F*** ing semicolon * Removed useless mut
This commit is contained in:
@@ -239,9 +239,16 @@ impl LivingEntity {
|
||||
.await;
|
||||
}
|
||||
} else if height_difference < 0.0 {
|
||||
let distance = self.fall_distance.load();
|
||||
self.fall_distance
|
||||
.store(distance - (height_difference as f32));
|
||||
let new_fall_distance = if !self.is_in_water().await && !self.is_in_powder_snow().await
|
||||
{
|
||||
let distance = self.fall_distance.load();
|
||||
distance - (height_difference as f32)
|
||||
} else {
|
||||
0f32
|
||||
};
|
||||
|
||||
// Reset fall distance if is in water or powder_snow
|
||||
self.fall_distance.store(new_fall_distance);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user