From 5703fdfdc498bfc10ecf38db104814e0223ec327 Mon Sep 17 00:00:00 2001 From: Kacpherek Date: Tue, 27 Oct 2026 22:19:13 +0100 Subject: [PATCH] Let slimes, ghasts and calm piglins not block a bed ServerPlayer.startSleepInBed looks for Monster entities that isPreventingPlayerRest; slimes, ghasts, phantoms and unangry zombified piglins are not. Horizon counted every hostile-category mob. --- crates/horizon-client/src/game.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/crates/horizon-client/src/game.rs b/crates/horizon-client/src/game.rs index 8e591cf3b..04a2d5e05 100644 --- a/crates/horizon-client/src/game.rs +++ b/crates/horizon-client/src/game.rs @@ -10898,7 +10898,11 @@ impl Game<'_> { // Creative players skip the monster check (`!this.isCreative()`). let monsters = !self.creative && self.mobs.iter().any(|m| { - m.hostile() + // `Monster.class` entities that `isPreventingPlayerRest`: a + // zombified piglin only while it is angry. + horizon_client::mobs::ai::is_monster(m.species()) + && (m.species() != horizon_client::mobs::Species::ZombifiedPiglin + || (m.extra.anger > 0 && m.ai.target.is_some())) && m.alive() && (m.position.x - position.x).abs() < 8.0 && (m.position.y - position.y).abs() < 5.0