[PR #3124] [MERGED] Crowded mobs take cramming damage, as vanilla #4816

Closed
opened 2026-11-03 05:08:09 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

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

Base: main ← Head: fix/mob-crowd-push


📝 Commits (1)

  • f6b467e Hurt crammed mobs by 6 at the max entity cramming limit

📊 Changes

4 files changed (+25 additions, -8 deletions)

View changed files

📝 crates/horizon-client/examples/probe/mob_ai_probe.rs (+1 -0)
📝 crates/horizon-client/src/game/creatures.rs (+2 -0)
📝 crates/horizon-client/src/mobs.rs (+7 -0)
📝 crates/horizon-client/src/mobs/ai.rs (+15 -8)

📄 Description

What and why

  • Players gathering many mobs in a small area saw them shove each other far harder than in Java (#3114).
  • The pairwise push itself already matches vanilla (Entity.push(Entity): same normalisation, the 0.05 scale, both mobs pushed, once per mob per tick), so this pull request does not change it.
  • What was missing is the rule that thins a crowd: vanilla LivingEntity.pushEntities hurts a mob by 6 (cramming damage) on a quarter of the ticks while max_entity_cramming (default 24) or more non-riding entities are pushable around it. Horizon only drew the random number and never hurt anyone, so a packed crowd stayed packed and kept pushing at full strength.
  • Mobs now take that damage. The max_entity_cramming game rule is honoured (0 turns it off). cramming is added as a damage type (ignores armor and wolf armor, no knockback).

Refs #3114. This is the one difference I found in the mob push code; I could not confirm it is all the reporter saw.

Vanilla reference

  • LivingEntity.pushEntities (the cramming check and doPush)
  • Entity.push(Entity)
  • DamageSources.cramming, DamageTypes.CRAMMING, tags bypasses_armor, bypasses_wolf_armor, no_knockback

Self-check

fmt passes. Built and tested by this pull request's checks. Not run in game.


🔄 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/3124 **Author:** [@kacpherek](https://github.com/kacpherek) **Created:** 10/28/2026 **Status:** ✅ Merged **Merged:** 10/28/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/mob-crowd-push` --- ### 📝 Commits (1) - [`f6b467e`](https://github.com/horizon-rust/horizon/commit/f6b467eba9d3d091b3b9f1e3f7993675e783cbd5) Hurt crammed mobs by 6 at the max entity cramming limit ### 📊 Changes **4 files changed** (+25 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/examples/probe/mob_ai_probe.rs` (+1 -0) 📝 `crates/horizon-client/src/game/creatures.rs` (+2 -0) 📝 `crates/horizon-client/src/mobs.rs` (+7 -0) 📝 `crates/horizon-client/src/mobs/ai.rs` (+15 -8) </details> ### 📄 Description ## What and why - Players gathering many mobs in a small area saw them shove each other far harder than in Java (#3114). - The pairwise push itself already matches vanilla (`Entity.push(Entity)`: same normalisation, the 0.05 scale, both mobs pushed, once per mob per tick), so this pull request does not change it. - What was missing is the rule that thins a crowd: vanilla `LivingEntity.pushEntities` hurts a mob by 6 (`cramming` damage) on a quarter of the ticks while `max_entity_cramming` (default 24) or more non-riding entities are pushable around it. Horizon only drew the random number and never hurt anyone, so a packed crowd stayed packed and kept pushing at full strength. - Mobs now take that damage. The `max_entity_cramming` game rule is honoured (0 turns it off). `cramming` is added as a damage type (ignores armor and wolf armor, no knockback). Refs #3114. This is the one difference I found in the mob push code; I could not confirm it is all the reporter saw. ## Vanilla reference - `LivingEntity.pushEntities` (the cramming check and `doPush`) - `Entity.push(Entity)` - `DamageSources.cramming`, `DamageTypes.CRAMMING`, tags `bypasses_armor`, `bypasses_wolf_armor`, `no_knockback` ## Self-check fmt passes. Built and tested by this pull request's checks. Not run in game. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:08:09 +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#4816
No description provided.