[PR #3957] [MERGED] Fix a batch of small mob, block and world-list behaviours so they match vanilla #5320

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/3957
Author: @kacpherek
Created: 10/29/2026
Status: ✅ Merged
Merged: 10/30/2026
Merged by: @levzzz5154

Base: main ← Head: fix/split-misc-b


📝 Commits (10+)

  • a9e1f45 Break a lily pad that a boat drives over
  • c61911f Play the dried ghast sound when it takes water
  • 68cfbd6 Make dolphins flee guardians and ignore their hits
  • 17383e6 Hold items in an allay's own hand transform
  • 8aeb55f Apply x_rotation and y_rotation ranges in entity selectors
  • 925580f Name the mob a renamed spawn egg spawns
  • 6ec46d1 Pick the piston a piston head belongs to
  • dc5695d Mark worlds another running copy has open as locked
  • c97f4da Make allays pick up only the items they can see
  • c847730 Let mobs slide down honey blocks

📊 Changes

25 files changed (+403 additions, -29 deletions)

View changed files

📝 crates/horizon-client/src/game.rs (+20 -0)
📝 crates/horizon-client/src/game/allays.rs (+22 -2)
📝 crates/horizon-client/src/game/armor_stands.rs (+11 -3)
📝 crates/horizon-client/src/game/block_items.rs (+14 -2)
📝 crates/horizon-client/src/game/commands.rs (+36 -0)
📝 crates/horizon-client/src/game/creatures.rs (+25 -1)
📝 crates/horizon-client/src/game/dispenser.rs (+11 -1)
📝 crates/horizon-client/src/game/lan.rs (+13 -0)
📝 crates/horizon-client/src/game/piglins.rs (+13 -2)
📝 crates/horizon-client/src/game/remote.rs (+3 -1)
📝 crates/horizon-client/src/game/remote_mob_data.rs (+2 -0)
📝 crates/horizon-client/src/game/remote_vehicles.rs (+5 -0)
📝 crates/horizon-client/src/mobs/ai.rs (+64 -7)
📝 crates/horizon-client/src/mobs/anim.rs (+9 -0)
📝 crates/horizon-client/src/mobs/aquatic.rs (+17 -1)
📝 crates/horizon-client/src/mobs/fox.rs (+4 -3)
📝 crates/horizon-client/src/mobs/goals.rs (+37 -0)
📝 crates/horizon-client/src/mobs/hostile.rs (+3 -2)
📝 crates/horizon-client/src/mobs/rabbit.rs (+4 -3)
📝 crates/horizon-client/src/mobs/render.rs (+23 -1)

...and 5 more files

📄 Description

What and why

  • Break a lily pad that a boat drives over: a boat passing over a lily pad left it in place; vanilla destroys the pad with its drops.
  • Play the dried ghast sound when it takes water: a dried ghast filled with water made no place-in-water sound.
  • Make dolphins flee guardians and ignore their hits: dolphins ignored guardians and took their hits as attacks; they now avoid guardians and ignore their hurt-by-target hits.
  • Hold items in an allay's own hand transform: allay items were placed with the humanoid hand offset; now they use the body, the right arm's pitch, a 0.7 scale and a shift.
  • Apply x_rotation and y_rotation ranges in entity selectors: selectors parsed the ranges but never filtered, so @e[y_rotation=...] matched regardless of facing.
  • Name the mob a renamed spawn egg spawns: a spawn egg renamed in an anvil spawned an unnamed mob.
  • Pick the piston a piston head belongs to: pick block on a piston head gave nothing; it now gives a sticky or plain piston by the head's type.
  • Mark worlds another running copy has open as locked: the world list showed a world open in another instance as an ordinary world; it now shows it as locked and it cannot be joined.
  • Make allays pick up only the items they can see: an allay walked to a matching item behind a wall.
  • Let mobs slide down honey blocks: mobs fell through honey blocks while only the player slid; now they slow down beside the block with the slide sound and particles.
  • Make piglins walk only to wanted items they can see: piglins took the nearest wanted item even behind a wall.
  • Name an armor stand placed from a renamed item: a renamed armor stand item placed an unnamed stand.
  • Name mobs and armor stands a dispenser places from a renamed item: the dispenser paths skipped the custom name that hand-placed paths now apply.
  • Hide saddle reins on a horse nobody rides: a saddled horse with no rider drew its left and right saddle lines.
  • Hide bogged mushrooms once it is sheared: a sheared bogged kept its mushrooms on the head.
  • Chime amethyst blocks when a projectile hits them: a projectile striking an amethyst block played nothing.
  • Let rabbits, foxes and silverfish climb out of powder snow: mobs stuck in powder snow never jumped out because the goal was missing from their registrations.

Vanilla reference

  • Lily pad and boat: LilyPadBlock.entityInside, LilyPadBlock.java:27
  • Dried ghast water sound: DriedGhastBlock.placeLiquid, DriedGhastBlock.java:174
  • Dolphins and guardians: Dolphin.registerGoals, Dolphin.java:158
  • Allay held item: AllayModel.translateToHand, AllayModel.java:120
  • Selector rotation ranges: EntitySelectorParser.createRotationPredicate, EntitySelectorParser.java:188
  • Renamed spawn egg, armor stand and dispenser names: Entity.applyImplicitComponents, Entity.java:4281; EntityType.createDefaultStackConfig, EntityType.java:171
  • Piston head pick block: PistonHeadBlock.getCloneItemStack, PistonHeadBlock.java:116
  • Locked worlds: DirectoryLock.isLocked, DirectoryLock.java:66; LevelSummary.createInfo, LevelSummary.java:154
  • Allay and piglin visible items: NearestItemSensor.doTick, NearestItemSensor.java:24 (piglins also PiglinAi GoToWantedItem)
  • Honey block slide: HoneyBlock.entityInside, HoneyBlock.java:75
  • Horse saddle lines: EquineSaddleModel.setupAnim, EquineSaddleModel.java:64
  • Bogged mushrooms: BoggedModel.setupAnim, BoggedModel.java:62
  • Amethyst chime: AmethystBlock.onProjectileHit, AmethystBlock.java:18
  • Powder snow climbing: ClimbOnTopOfPowderSnowGoal, ClimbOnTopOfPowderSnowGoal.java:23

Self-check

rustfmt on changed files; built by CI; not run in game. Merged main; the spectral arrow trail is dropped because #2987 already draws it. Not run: the title-screen lock check and python3 tools/parity.py mob_ai (both need a game or probe build).

Split out of #3926.


🔄 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/3957 **Author:** [@kacpherek](https://github.com/kacpherek) **Created:** 10/29/2026 **Status:** ✅ Merged **Merged:** 10/30/2026 **Merged by:** [@levzzz5154](https://github.com/levzzz5154) **Base:** `main` ← **Head:** `fix/split-misc-b` --- ### 📝 Commits (10+) - [`a9e1f45`](https://github.com/horizon-rust/horizon/commit/a9e1f452df3d6d8d93cde6257d2cf8ffa107f6f7) Break a lily pad that a boat drives over - [`c61911f`](https://github.com/horizon-rust/horizon/commit/c61911ffcd233f7a13151080656b11bc568f3f5e) Play the dried ghast sound when it takes water - [`68cfbd6`](https://github.com/horizon-rust/horizon/commit/68cfbd61dad401e59e4441adb23b04cd395f8ddf) Make dolphins flee guardians and ignore their hits - [`17383e6`](https://github.com/horizon-rust/horizon/commit/17383e6fe0bbba6c1225821f9ba864319605eb5c) Hold items in an allay's own hand transform - [`8aeb55f`](https://github.com/horizon-rust/horizon/commit/8aeb55f0cff5853683059d67a1b53eeeffcda220) Apply x_rotation and y_rotation ranges in entity selectors - [`925580f`](https://github.com/horizon-rust/horizon/commit/925580fe3da7d411140dcc2e7c7c4684c6959beb) Name the mob a renamed spawn egg spawns - [`6ec46d1`](https://github.com/horizon-rust/horizon/commit/6ec46d1a8176bcbabf23633332f77d5c6e850fa0) Pick the piston a piston head belongs to - [`dc5695d`](https://github.com/horizon-rust/horizon/commit/dc5695dfa7d16181c1b95b3849d47dedfc7a8328) Mark worlds another running copy has open as locked - [`c97f4da`](https://github.com/horizon-rust/horizon/commit/c97f4da629e033139e5f559494b67914f9509009) Make allays pick up only the items they can see - [`c847730`](https://github.com/horizon-rust/horizon/commit/c8477304a36e6bd5605848f3714ff7a48c008098) Let mobs slide down honey blocks ### 📊 Changes **25 files changed** (+403 additions, -29 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+20 -0) 📝 `crates/horizon-client/src/game/allays.rs` (+22 -2) 📝 `crates/horizon-client/src/game/armor_stands.rs` (+11 -3) 📝 `crates/horizon-client/src/game/block_items.rs` (+14 -2) 📝 `crates/horizon-client/src/game/commands.rs` (+36 -0) 📝 `crates/horizon-client/src/game/creatures.rs` (+25 -1) 📝 `crates/horizon-client/src/game/dispenser.rs` (+11 -1) 📝 `crates/horizon-client/src/game/lan.rs` (+13 -0) 📝 `crates/horizon-client/src/game/piglins.rs` (+13 -2) 📝 `crates/horizon-client/src/game/remote.rs` (+3 -1) 📝 `crates/horizon-client/src/game/remote_mob_data.rs` (+2 -0) 📝 `crates/horizon-client/src/game/remote_vehicles.rs` (+5 -0) 📝 `crates/horizon-client/src/mobs/ai.rs` (+64 -7) 📝 `crates/horizon-client/src/mobs/anim.rs` (+9 -0) 📝 `crates/horizon-client/src/mobs/aquatic.rs` (+17 -1) 📝 `crates/horizon-client/src/mobs/fox.rs` (+4 -3) 📝 `crates/horizon-client/src/mobs/goals.rs` (+37 -0) 📝 `crates/horizon-client/src/mobs/hostile.rs` (+3 -2) 📝 `crates/horizon-client/src/mobs/rabbit.rs` (+4 -3) 📝 `crates/horizon-client/src/mobs/render.rs` (+23 -1) _...and 5 more files_ </details> ### 📄 Description ## What and why - Break a lily pad that a boat drives over: a boat passing over a lily pad left it in place; vanilla destroys the pad with its drops. - Play the dried ghast sound when it takes water: a dried ghast filled with water made no place-in-water sound. - Make dolphins flee guardians and ignore their hits: dolphins ignored guardians and took their hits as attacks; they now avoid guardians and ignore their hurt-by-target hits. - Hold items in an allay's own hand transform: allay items were placed with the humanoid hand offset; now they use the body, the right arm's pitch, a 0.7 scale and a shift. - Apply x_rotation and y_rotation ranges in entity selectors: selectors parsed the ranges but never filtered, so `@e[y_rotation=...]` matched regardless of facing. - Name the mob a renamed spawn egg spawns: a spawn egg renamed in an anvil spawned an unnamed mob. - Pick the piston a piston head belongs to: pick block on a piston head gave nothing; it now gives a sticky or plain piston by the head's type. - Mark worlds another running copy has open as locked: the world list showed a world open in another instance as an ordinary world; it now shows it as locked and it cannot be joined. - Make allays pick up only the items they can see: an allay walked to a matching item behind a wall. - Let mobs slide down honey blocks: mobs fell through honey blocks while only the player slid; now they slow down beside the block with the slide sound and particles. - Make piglins walk only to wanted items they can see: piglins took the nearest wanted item even behind a wall. - Name an armor stand placed from a renamed item: a renamed armor stand item placed an unnamed stand. - Name mobs and armor stands a dispenser places from a renamed item: the dispenser paths skipped the custom name that hand-placed paths now apply. - Hide saddle reins on a horse nobody rides: a saddled horse with no rider drew its left and right saddle lines. - Hide bogged mushrooms once it is sheared: a sheared bogged kept its mushrooms on the head. - Chime amethyst blocks when a projectile hits them: a projectile striking an amethyst block played nothing. - Let rabbits, foxes and silverfish climb out of powder snow: mobs stuck in powder snow never jumped out because the goal was missing from their registrations. ## Vanilla reference - Lily pad and boat: `LilyPadBlock.entityInside`, LilyPadBlock.java:27 - Dried ghast water sound: `DriedGhastBlock.placeLiquid`, DriedGhastBlock.java:174 - Dolphins and guardians: `Dolphin.registerGoals`, Dolphin.java:158 - Allay held item: `AllayModel.translateToHand`, AllayModel.java:120 - Selector rotation ranges: `EntitySelectorParser.createRotationPredicate`, EntitySelectorParser.java:188 - Renamed spawn egg, armor stand and dispenser names: `Entity.applyImplicitComponents`, Entity.java:4281; `EntityType.createDefaultStackConfig`, EntityType.java:171 - Piston head pick block: `PistonHeadBlock.getCloneItemStack`, PistonHeadBlock.java:116 - Locked worlds: `DirectoryLock.isLocked`, DirectoryLock.java:66; `LevelSummary.createInfo`, LevelSummary.java:154 - Allay and piglin visible items: `NearestItemSensor.doTick`, NearestItemSensor.java:24 (piglins also `PiglinAi` GoToWantedItem) - Honey block slide: `HoneyBlock.entityInside`, HoneyBlock.java:75 - Horse saddle lines: `EquineSaddleModel.setupAnim`, EquineSaddleModel.java:64 - Bogged mushrooms: `BoggedModel.setupAnim`, BoggedModel.java:62 - Amethyst chime: `AmethystBlock.onProjectileHit`, AmethystBlock.java:18 - Powder snow climbing: `ClimbOnTopOfPowderSnowGoal`, ClimbOnTopOfPowderSnowGoal.java:23 ## Self-check rustfmt on changed files; built by CI; not run in game. Merged main; the spectral arrow trail is dropped because #2987 already draws it. Not run: the title-screen lock check and `python3 tools/parity.py mob_ai` (both need a game or probe build). Split out of #3926. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:11:47 +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#5320
No description provided.