mirror of
https://github.com/horizon-rust/horizon.git
synced 2026-11-09 10:39:46 -10:00
Format the hostile mob fixes
This commit is contained in:
1 parent
0d7f842b09
commit
f69088012b
2 files changed
+2
-6
No files matched your search
@@ -1230,11 +1230,7 @@ impl Game<'_> {
|
||||
let m = &mut self.mobs[i];
|
||||
if harm {
|
||||
let harm = m.potion_harm((intensity * f64::from(6 << amp) + 0.5) as i32 as f32);
|
||||
m.hurt(
|
||||
harm,
|
||||
Some([at.x, at.y, at.z]),
|
||||
&mut self.world.random,
|
||||
);
|
||||
m.hurt(harm, Some([at.x, at.y, at.z]), &mut self.world.random);
|
||||
} else {
|
||||
m.health = (m.health + (intensity * f64::from(4 << amp) + 0.5) as i32 as f32)
|
||||
.min(m.kind.max_health);
|
||||
|
||||
@@ -121,7 +121,7 @@ impl Game<'_> {
|
||||
}
|
||||
/// `WitherSkull.onHitEntity` / `onHit`: 8 damage (healing the wither 5
|
||||
/// when it kills), withering on a hit (10 seconds on Normal, 40 on Hard,
|
||||
/// none on Easy), then a power 1 blast.
|
||||
/// none on Easy), then a power 1 blast.
|
||||
pub(super) fn wither_skull_hit(
|
||||
&mut self,
|
||||
p: &Projectile,
|
||||
|
||||
Reference in new issue
Block a user