[PR #2145] [MERGED] Respect mobGriefing for mob explosions and endermen #4046

Closed
opened 2026-11-03 04:14:17 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/2145
Author: @kacpherek
Created: 10/26/2026
Status: ✅ Merged
Merged: 10/26/2026
Merged by: @ludovic111

Base: main ← Head: fix/mob-griefing-explosions-endermen


📝 Commits (1)

  • 02f2227 Respect mobGriefing for mob explosions and endermen

📊 Changes

2 files changed (+21 additions, -12 deletions)

View changed files

📝 crates/horizon-client/src/game.rs (+11 -8)
📝 crates/horizon-client/src/mobs/enderman.rs (+10 -4)

📄 Description

What and why

With the mobGriefing game rule off, mobs could still change blocks in two ways:

  • Mob explosions (creeper, ghast fireball, wither skull, wither spawn blast) always destroyed blocks with drop decay. They now keep blocks when mobGriefing is off. When it is on, the mob_explosion_drop_decay rule picks between decay and plain destruction. Damage to entities is unchanged.
  • Endermen kept taking and placing blocks. The two goals now do nothing when mobGriefing is off. The rule is checked before the random draw, as in vanilla, so no random numbers are used while it is off.

Vanilla reference

  • ServerLevel.explode: ExplosionInteraction.MOB gives KEEP without mob griefing, otherwise getDestroyType(MOB_EXPLOSION_DROP_DECAY). Callers using MOB are Creeper.explodeCreeper, LargeFireball.onHit, WitherSkull.onHit and WitherBoss.customServerAiStep.
  • EnderMan.EndermanTakeBlockGoal.canUse and EnderMan.EndermanLeaveBlockGoal.canUse return false when mob griefing is off.

Self-check

cargo check -p horizon-client passes.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/2145 **Author:** [@kacpherek](https://github.com/kacpherek) **Created:** 10/26/2026 **Status:** ✅ Merged **Merged:** 10/26/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/mob-griefing-explosions-endermen` --- ### 📝 Commits (1) - [`02f2227`](https://github.com/horizon-rust/horizon/commit/02f222728d7d182d278879fb20e7a9b9d5ccc16d) Respect mobGriefing for mob explosions and endermen ### 📊 Changes **2 files changed** (+21 additions, -12 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+11 -8) 📝 `crates/horizon-client/src/mobs/enderman.rs` (+10 -4) </details> ### 📄 Description ## What and why With the `mobGriefing` game rule off, mobs could still change blocks in two ways: - Mob explosions (creeper, ghast fireball, wither skull, wither spawn blast) always destroyed blocks with drop decay. They now keep blocks when `mobGriefing` is off. When it is on, the `mob_explosion_drop_decay` rule picks between decay and plain destruction. Damage to entities is unchanged. - Endermen kept taking and placing blocks. The two goals now do nothing when `mobGriefing` is off. The rule is checked before the random draw, as in vanilla, so no random numbers are used while it is off. ## Vanilla reference - `ServerLevel.explode`: `ExplosionInteraction.MOB` gives `KEEP` without mob griefing, otherwise `getDestroyType(MOB_EXPLOSION_DROP_DECAY)`. Callers using `MOB` are `Creeper.explodeCreeper`, `LargeFireball.onHit`, `WitherSkull.onHit` and `WitherBoss.customServerAiStep`. - `EnderMan.EndermanTakeBlockGoal.canUse` and `EnderMan.EndermanLeaveBlockGoal.canUse` return false when mob griefing is off. ## Self-check `cargo check -p horizon-client` passes. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 04:14:17 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#4046
No description provided.