Entity-bound sounds follow the dragon itself; ledger rows for #9382

A sound bound to the Ender Dragon read the copy spawn_entity keeps in mobs,
which move_entity never moves, so it stayed at the spawn point. The live
dragon's position goes first now. The port ledger listed
EntityBoundSoundInstance.tick as missing although #9382 ported it.
From martipops's review of #9382.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
Horizon agentandClaude Opus 5.5 committed 2026-11-05 04:16:31 +01:00
1 parent 9540aaeb86
commit 7d3557e5af
3 files changed
+10 -4

No files matched your search

+8 -2
View File
@@ -790,8 +790,14 @@ impl Game<'_> {
let mut state = entity_sound_state(id, player, &self.mobs, &r.entities)?;
// Vehicles, projectiles and other simulated objects may have moved since
// the last tracking packet, just as the mob interpolation has.
if let Some(position) = self
.level_entity(id)
// The dragon: `spawn_entity` keeps a copy of it in `mobs` that `move_entity` leaves where it
// spawned, so its own state goes first.
let dragon = u32::try_from(id)
.ok()
.filter(|id| self.dragon.as_ref().is_some_and(|d| d.id == *id))
.map(super::commands::Target::Dragon);
if let Some(position) = dragon
.or_else(|| self.level_entity(id))
.and_then(|target| self.target_position(target))
{
state.position = position;
+1 -1
View File
@@ -77,7 +77,7 @@ ClientPacketListener.applyPlayerInfoUpdate inline crates/horizon-client/src/game
ClientPacketListener.initializeChatSession port crates/horizon-client/src/game/remote.rs::Remote::new_chat_validator the session each INITIALIZE_CHAT entry carries is kept and checked against the services' profile-key keys when the player's chat is first read
ClientPacketListener.enforcesSecureChat inline crates/horizon-client/src/game/remote.rs::Game::handle_packet the Login flag is kept as serverEnforcesSecureChat and the fallback message validator enforces it
ClientPacketListener.handleGameRuleValues port crates/horizon-client/src/game/lan_screen.rs::Game::remote_world_options_rules
ClientPacketListener.handleSoundEntityEvent port crates/horizon-client/src/game/remote.rs::Game::handle_packet SoundEntity arm: the sound plays where the tracked entity is
ClientPacketListener.handleSoundEntityEvent port crates/horizon-client/src/game/remote.rs::Game::handle_packet SoundEntity arm: an EntityBoundSoundInstance that starts where the entity is and follows it (SoundInstance::tick)
ClientPacketListener.handleAddObjective port crates/horizon-client/src/game/remote.rs::Game::remote_objective add, remove and update of an objective
ClientPacketListener.handleSetScore port crates/horizon-client/src/game/remote.rs::Game::handle_packet SetScore arm
ClientPacketListener.handleResetScore port crates/horizon-client/src/game/remote.rs::Game::handle_packet ResetScore arm
1 ClientPacketListener.<init> port crates/horizon-client/src/game/remote.rs::Game::join_server the chat is cleared on join (hud_disconnected leaves it out), while a reconfiguration keeps it: Event::Reconfiguring flushes it and ChatComponent.storeState's state survives
77 ClientPacketListener.initializeChatSession port crates/horizon-client/src/game/remote.rs::Remote::new_chat_validator the session each INITIALIZE_CHAT entry carries is kept and checked against the services' profile-key keys when the player's chat is first read
78 ClientPacketListener.enforcesSecureChat inline crates/horizon-client/src/game/remote.rs::Game::handle_packet the Login flag is kept as serverEnforcesSecureChat and the fallback message validator enforces it
79 ClientPacketListener.handleGameRuleValues port crates/horizon-client/src/game/lan_screen.rs::Game::remote_world_options_rules
80 ClientPacketListener.handleSoundEntityEvent port crates/horizon-client/src/game/remote.rs::Game::handle_packet SoundEntity arm: the sound plays where the tracked entity is SoundEntity arm: an EntityBoundSoundInstance that starts where the entity is and follows it (SoundInstance::tick)
81 ClientPacketListener.handleAddObjective port crates/horizon-client/src/game/remote.rs::Game::remote_objective add, remove and update of an objective
82 ClientPacketListener.handleSetScore port crates/horizon-client/src/game/remote.rs::Game::handle_packet SetScore arm
83 ClientPacketListener.handleResetScore port crates/horizon-client/src/game/remote.rs::Game::handle_packet ResetScore arm
+1 -1
View File
@@ -140,7 +140,7 @@ AbstractSoundInstance.getOrResolve port crates/horizon-client-render/src/sound_e
BeeSoundInstance.tick port crates/horizon-client-render/src/sound_engine.rs::SoundInstance::tick Ticking::Bee follows the bee; pitch and volume from speed
DirectionalSoundInstance.setPosition port crates/horizon-client/src/game/end.rs::Game::tick_end gap: minor: the end flash plays without a position, so the 10-block offset toward the view is not kept
ElytraOnPlayerSoundInstance.tick port crates/horizon-client-render/src/sound_engine.rs::SoundInstance::tick the `Elytra` arm: `item.elytra.flying` follows the player each tick, stops 20 ticks after gliding ends, volume `speed / 4` clamped, silent for a second then fading in over the next
EntityBoundSoundInstance.tick missing minor: a sound tied to an entity does not follow it; it stays at its start point
EntityBoundSoundInstance.tick port crates/horizon-client-render/src/sound_engine.rs::SoundInstance::tick the `EntityBound` arm: follows the entity each tick (Game::remote_sound_entity_state), stops when it is removed or silent, returning before it moves as vanilla does
RidingEntitySoundInstance.tick port crates/horizon-client-render/src/sound_engine.rs::SoundInstance::tick the `RidingEntity` arm for `entity.happy_ghast.riding` and `entity.nautilus.riding`: stops when the ridden mob is gone or silent, volume 0 unless the underwater test matches and the speed is at least 0.01, else the clamped lerp
RidingMinecartSoundInstance.shoudlPlaySound port crates/horizon-client-render/src/sound_engine.rs::SoundInstance::tick RidingMinecart arm; the predicate is always true for OldMinecartBehavior, Horizon's only minecart
SnifferSoundInstance.tick port crates/horizon-client/src/game/sniffers.rs::Game::tick_sniffer_effects gap: player: the digging sound plays once when digging starts; vanilla loops it while digging
1 EquipmentClientInfo.Layer.leatherDyeable skip:data equipment asset factory; Horizon reads the equipment JSON in armor_stands.rs
140 BeeSoundInstance.tick port crates/horizon-client-render/src/sound_engine.rs::SoundInstance::tick Ticking::Bee follows the bee; pitch and volume from speed
141 DirectionalSoundInstance.setPosition port crates/horizon-client/src/game/end.rs::Game::tick_end gap: minor: the end flash plays without a position, so the 10-block offset toward the view is not kept
142 ElytraOnPlayerSoundInstance.tick port crates/horizon-client-render/src/sound_engine.rs::SoundInstance::tick the `Elytra` arm: `item.elytra.flying` follows the player each tick, stops 20 ticks after gliding ends, volume `speed / 4` clamped, silent for a second then fading in over the next
143 EntityBoundSoundInstance.tick missing port crates/horizon-client-render/src/sound_engine.rs::SoundInstance::tick minor: a sound tied to an entity does not follow it; it stays at its start point the `EntityBound` arm: follows the entity each tick (Game::remote_sound_entity_state), stops when it is removed or silent, returning before it moves as vanilla does
144 RidingEntitySoundInstance.tick port crates/horizon-client-render/src/sound_engine.rs::SoundInstance::tick the `RidingEntity` arm for `entity.happy_ghast.riding` and `entity.nautilus.riding`: stops when the ridden mob is gone or silent, volume 0 unless the underwater test matches and the speed is at least 0.01, else the clamped lerp
145 RidingMinecartSoundInstance.shoudlPlaySound port crates/horizon-client-render/src/sound_engine.rs::SoundInstance::tick RidingMinecart arm; the predicate is always true for OldMinecartBehavior, Horizon's only minecart
146 SnifferSoundInstance.tick port crates/horizon-client/src/game/sniffers.rs::Game::tick_sniffer_effects gap: player: the digging sound plays once when digging starts; vanilla loops it while digging