Format the hostile mob fixes
This commit is contained in:
@@ -1230,11 +1230,7 @@ impl Game<'_> {
|
|||||||
let m = &mut self.mobs[i];
|
let m = &mut self.mobs[i];
|
||||||
if harm {
|
if harm {
|
||||||
let harm = m.potion_harm((intensity * f64::from(6 << amp) + 0.5) as i32 as f32);
|
let harm = m.potion_harm((intensity * f64::from(6 << amp) + 0.5) as i32 as f32);
|
||||||
m.hurt(
|
m.hurt(harm, Some([at.x, at.y, at.z]), &mut self.world.random);
|
||||||
harm,
|
|
||||||
Some([at.x, at.y, at.z]),
|
|
||||||
&mut self.world.random,
|
|
||||||
);
|
|
||||||
} else {
|
} else {
|
||||||
m.health = (m.health + (intensity * f64::from(4 << amp) + 0.5) as i32 as f32)
|
m.health = (m.health + (intensity * f64::from(4 << amp) + 0.5) as i32 as f32)
|
||||||
.min(m.kind.max_health);
|
.min(m.kind.max_health);
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ impl Game<'_> {
|
|||||||
}
|
}
|
||||||
/// `WitherSkull.onHitEntity` / `onHit`: 8 damage (healing the wither 5
|
/// `WitherSkull.onHitEntity` / `onHit`: 8 damage (healing the wither 5
|
||||||
/// when it kills), withering on a hit (10 seconds on Normal, 40 on Hard,
|
/// 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(
|
pub(super) fn wither_skull_hit(
|
||||||
&mut self,
|
&mut self,
|
||||||
p: &Projectile,
|
p: &Projectile,
|
||||||
|
|||||||
Reference in New Issue
Block a user