Merge pull request #10094 from DUzzL/fix/10045-enderman-anger-harming

Splash of harming makes endermen teleport instead of hurting them
This commit is contained in:
Kacper authored and GitHub committed 2026-11-06 08:58:21 +01:00
commit 966a63278e
1 file changed
+8 -1
+8 -1
View File
@@ -1987,7 +1987,14 @@ impl Game<'_> {
}
};
let m = &mut self.mobs[i];
if harm {
if harm && m.species() == horizon_client::mobs::Species::Enderman {
// `Enderman.hurtServer` for a thrown potion: only water hurts
// (`hurtWithCleanWater`), then `repeatedlyTryToTeleport`, which
// the AI step runs and which does nothing while it rides.
if m.alive() && !m.extra.passenger {
m.extra.counter2 = 64;
}
} else if harm {
// HealOrHarmMobEffect.applyInstantaneousEffect: indirectMagic(potion, owner).
let harm = (intensity * f64::from(6 << amp) + 0.5) as i32 as f32;
let source = Damage::indirect_magic(owner.who(), [at.x, at.y, at.z]);