[PR #2545] [MERGED] Show goats' lost horns and let them lower their head and ram #4416

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

📋 Pull Request Information

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

Base: main ← Head: fix/goat-horns-ram


📝 Commits (10+)

  • 57e8de0 Send the drowning entity event (67) and draw the bubbles on clients
  • 6887331 Freeze mobs in powder snow and shake frozen mobs and cold striders
  • a45d0de Server-thread clients animate warden, sniffer, breeze, camel and shulker
  • 25c53cc Server-thread clients animate ravager, hoglin, iron golem, creaking, vex, allay, axolotl, guardian, copper golem and strider
  • 11e1ff1 Let armadillos roll up when scared, peek out and take less damage as a ball
  • 04b0b9a Let frogs croak, shoot their tongue at small slimes and idle-swim
  • 400d9e6 Show goats' lost horns and let them lower their head and ram
  • 909f15b Count the warden tendril and heart animations down again
  • 5435eb0 Send a cold strider's shiver at index 19
  • ef0ea5d Merge main into fix/drowning-bubbles

📊 Changes

34 files changed (+2191 additions, -112 deletions)

View changed files

📝 crates/horizon-client/examples/probe/mob_ai_probe.rs (+2 -0)
📝 crates/horizon-client/src/game.rs (+5 -18)
📝 crates/horizon-client/src/game/combat.rs (+42 -1)
📝 crates/horizon-client/src/game/commands/world_cmds.rs (+1 -0)
📝 crates/horizon-client/src/game/creatures.rs (+28 -0)
📝 crates/horizon-client/src/game/lan.rs (+163 -1)
📝 crates/horizon-client/src/game/lan_actions.rs (+9 -0)
📝 crates/horizon-client/src/game/lan_mobs.rs (+6 -0)
📝 crates/horizon-client/src/game/remote.rs (+64 -0)
📝 crates/horizon-client/src/game/remote_mob_data.rs (+54 -1)
📝 crates/horizon-client/src/mobs.rs (+57 -0)
📝 crates/horizon-client/src/mobs/ai.rs (+75 -14)
📝 crates/horizon-client/src/mobs/allay.rs (+5 -0)
➕ crates/horizon-client/src/mobs/armadillo.rs (+407 -0)
📝 crates/horizon-client/src/mobs/body_anim.rs (+5 -5)
📝 crates/horizon-client/src/mobs/breeze.rs (+22 -0)
📝 crates/horizon-client/src/mobs/camel.rs (+45 -4)
📝 crates/horizon-client/src/mobs/copper_golem.rs (+12 -2)
📝 crates/horizon-client/src/mobs/creaking.rs (+49 -21)
➕ crates/horizon-client/src/mobs/frog.rs (+312 -0)

...and 14 more files

📄 Description

What and why

Goats always drew two horns and never rammed. This builds on #2528 (its synced data and entity event path).

  • Lost horns: Goat::from_mob reads lost_horns, which finalizeSpawn already sets, and the server syncs DATA_HAS_LEFT_HORN and DATA_HAS_RIGHT_HORN (indices 19 and 20) so a client hides the horn.
  • Lowered head: lowerHeadTick follows entity events 58 and 59 and feeds the model's ramming_x_head_rot (30 degrees, 52.5 for a baby).
  • Ram (PrepareRamNearestTarget and RamTarget, one goal): when the ram cooldown is over, the goat picks the nearest living thing it sees (not a goat, not a creative player), walks to a spot 4 to 7 blocks away in a straight line, waits 20 ticks head down with the prepare sound, then charges at 3 times speed. It hurts what it hits (attack damage, mob_attack_no_aggro for a player) and knocks it back by speed times 2.5 (1 for a baby), or breaks off a horn on a block of #snaps_goat_horn (the horn drops, the lost horn is synced). Then the cooldown is 600 to 6000 ticks (100 to 300 for a screaming goat; 600 or 100 if no spot was found). The new Knockback mob event applies LivingEntity.knockback to a player or a mob.
  • finalizeSpawn's ram cooldown is kept in the goat's state instead of the unused memory list.

Differences from vanilla: the dropped horn has no instrument and is not thrown; a shield does not halve the knockback; a mob that is rammed gets the plain mob attack (not the no-aggro type); the tempting-player and breed-target gates of the ram activity are not checked because goats have no such goals here yet. The long jump is not part of this PR.

Vanilla reference

Goat.java (dropHorn, getRammingXHeadRot, aiStep, handleEntityEvent), GoatAi.java (ram activity), PrepareRamNearestTarget.java, RamTarget.java, tags/block/snaps_goat_horn.json, GoatModel.setupAnim.

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/2545 **Author:** [@kacpherek](https://github.com/kacpherek) **Created:** 10/26/2026 **Status:** ✅ Merged **Merged:** 10/27/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/goat-horns-ram` --- ### 📝 Commits (10+) - [`57e8de0`](https://github.com/horizon-rust/horizon/commit/57e8de0007d63eee598d96c3f9a305659f39327d) Send the drowning entity event (67) and draw the bubbles on clients - [`6887331`](https://github.com/horizon-rust/horizon/commit/688733132d7e105312337bb21cf8a96ee441ba33) Freeze mobs in powder snow and shake frozen mobs and cold striders - [`a45d0de`](https://github.com/horizon-rust/horizon/commit/a45d0de43eef252c6c0b45fad21e2e1bf70bf7bb) Server-thread clients animate warden, sniffer, breeze, camel and shulker - [`25c53cc`](https://github.com/horizon-rust/horizon/commit/25c53cc80330575cf822d2718ca9a0c4afbc3587) Server-thread clients animate ravager, hoglin, iron golem, creaking, vex, allay, axolotl, guardian, copper golem and strider - [`11e1ff1`](https://github.com/horizon-rust/horizon/commit/11e1ff12d0c516f3300c7919babfd4f66fc15131) Let armadillos roll up when scared, peek out and take less damage as a ball - [`04b0b9a`](https://github.com/horizon-rust/horizon/commit/04b0b9aed5eb24f99bf88185560238bd40330bf2) Let frogs croak, shoot their tongue at small slimes and idle-swim - [`400d9e6`](https://github.com/horizon-rust/horizon/commit/400d9e61157d13ca60a50847180892474ce34cc0) Show goats' lost horns and let them lower their head and ram - [`909f15b`](https://github.com/horizon-rust/horizon/commit/909f15b90979c4339575e4011c37f2d0588f3464) Count the warden tendril and heart animations down again - [`5435eb0`](https://github.com/horizon-rust/horizon/commit/5435eb0f17d6f655604ba9cec75a6d2a829ad0fa) Send a cold strider's shiver at index 19 - [`ef0ea5d`](https://github.com/horizon-rust/horizon/commit/ef0ea5daad19c6b79e58751de28341b7a761421b) Merge main into fix/drowning-bubbles ### 📊 Changes **34 files changed** (+2191 additions, -112 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/examples/probe/mob_ai_probe.rs` (+2 -0) 📝 `crates/horizon-client/src/game.rs` (+5 -18) 📝 `crates/horizon-client/src/game/combat.rs` (+42 -1) 📝 `crates/horizon-client/src/game/commands/world_cmds.rs` (+1 -0) 📝 `crates/horizon-client/src/game/creatures.rs` (+28 -0) 📝 `crates/horizon-client/src/game/lan.rs` (+163 -1) 📝 `crates/horizon-client/src/game/lan_actions.rs` (+9 -0) 📝 `crates/horizon-client/src/game/lan_mobs.rs` (+6 -0) 📝 `crates/horizon-client/src/game/remote.rs` (+64 -0) 📝 `crates/horizon-client/src/game/remote_mob_data.rs` (+54 -1) 📝 `crates/horizon-client/src/mobs.rs` (+57 -0) 📝 `crates/horizon-client/src/mobs/ai.rs` (+75 -14) 📝 `crates/horizon-client/src/mobs/allay.rs` (+5 -0) ➕ `crates/horizon-client/src/mobs/armadillo.rs` (+407 -0) 📝 `crates/horizon-client/src/mobs/body_anim.rs` (+5 -5) 📝 `crates/horizon-client/src/mobs/breeze.rs` (+22 -0) 📝 `crates/horizon-client/src/mobs/camel.rs` (+45 -4) 📝 `crates/horizon-client/src/mobs/copper_golem.rs` (+12 -2) 📝 `crates/horizon-client/src/mobs/creaking.rs` (+49 -21) ➕ `crates/horizon-client/src/mobs/frog.rs` (+312 -0) _...and 14 more files_ </details> ### 📄 Description ## What and why Goats always drew two horns and never rammed. This builds on #2528 (its synced data and entity event path). - Lost horns: `Goat::from_mob` reads `lost_horns`, which `finalizeSpawn` already sets, and the server syncs `DATA_HAS_LEFT_HORN` and `DATA_HAS_RIGHT_HORN` (indices 19 and 20) so a client hides the horn. - Lowered head: `lowerHeadTick` follows entity events 58 and 59 and feeds the model's `ramming_x_head_rot` (30 degrees, 52.5 for a baby). - Ram (`PrepareRamNearestTarget` and `RamTarget`, one goal): when the ram cooldown is over, the goat picks the nearest living thing it sees (not a goat, not a creative player), walks to a spot 4 to 7 blocks away in a straight line, waits 20 ticks head down with the prepare sound, then charges at 3 times speed. It hurts what it hits (attack damage, `mob_attack_no_aggro` for a player) and knocks it back by speed times 2.5 (1 for a baby), or breaks off a horn on a block of `#snaps_goat_horn` (the horn drops, the lost horn is synced). Then the cooldown is 600 to 6000 ticks (100 to 300 for a screaming goat; 600 or 100 if no spot was found). The new `Knockback` mob event applies `LivingEntity.knockback` to a player or a mob. - `finalizeSpawn`'s ram cooldown is kept in the goat's state instead of the unused memory list. Differences from vanilla: the dropped horn has no instrument and is not thrown; a shield does not halve the knockback; a mob that is rammed gets the plain mob attack (not the no-aggro type); the tempting-player and breed-target gates of the ram activity are not checked because goats have no such goals here yet. The long jump is not part of this PR. ## Vanilla reference `Goat.java` (`dropHorn`, `getRammingXHeadRot`, `aiStep`, `handleEntityEvent`), `GoatAi.java` (ram activity), `PrepareRamNearestTarget.java`, `RamTarget.java`, `tags/block/snaps_goat_horn.json`, `GoatModel.setupAnim`. ## 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:16:59 +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#4416
No description provided.