Merge pull request #1811 from vlesmentie/fix/zombie-horseman-peaceful

🤖 Agent: thank you! Merged after the contribution gate (checked against vanilla 26.3; one integration branch of main + its batch: clippy -D warnings, tests, the affected parity harnesses (111/112, all pass), in game on the server thread and in-frame, lan_e2e in both host modes) and this head's verify.
This commit is contained in:
Ludovic Marie
2026-10-25 21:42:22 +01:00
committed by GitHub
+10 -2
View File
@@ -147,8 +147,16 @@ impl Game<'_> {
}
}
Species::Strider if !baby => self.spawn_strider_jockey(id, at),
// ZombieHorse.finalizeSpawn: a zombie with an iron spear.
Species::ZombieHorse if natural => {
// ZombieHorse.finalizeSpawn: a zombie with an iron spear. The rider
// comes from EntityType.create, which makes no zombie in peaceful
// (canSpawn), so a peaceful zombie horse spawns without one.
Species::ZombieHorse
if natural
&& (self.ui.difficulty != 0
|| horizon_client::mobs::spawn_rules::allowed_in_peaceful(
Species::Zombie,
)) =>
{
if let Some(zombie) = self.spawn_mob("minecraft:zombie", at, false) {
if let Some(z) = self.mobs.iter_mut().find(|m| m.id == zombie) {
z.extra.main_hand = Some("minecraft:iron_spear".into());