The bug
Respawn anchors do not produce ambient sound, although a sound file for it exists (sound id minecraft:block.respawn_anchor.ambient
)
To reproduce
Place a respawn anchor.
Charge it with glowstone.
Wait.
Expected result
The respawn anchor would produce its ambient sound.
Observed result
The respawn anchor does not produce its ambient sound.
Code analysis
Code analysis by @unknown can be found in this comment.
Linked issues
relates to
Comments

Yes, respawn anchors have an ambient sound but it doesn't play.

Can confirm in 21w44a.

I was just analyzing the code used to play the ambience sound for the respawn anchors, and I think I've found the issue. Using official Mojang mappings on 1.17.1, within the animateTick
method of the RespawnAnchorBlock
class, the playSound
method is used to play the anchor's ambient sounds. The playSound
method works on the server's end by getting the server to tell its clients to play the sound appropriately - when run by itself on a client, the sound isn't played. Meanwhile, the animateTick
function is only run on client's end because it deals with cosmetic updates such as particle effects and animations. Since playSound
, a server-side-only method, is being used within animateTick
, a client-side-only method, the sound fails to play. The Nether Portal block's code (NetherPortalBlock
) plays its ambience correctly; it uses playLocalSound
instead, which is meant to run on the client-side.
TL;DR: The code for playing the respawn anchor's ambient sounds uses a server-side method within a method that only runs on clients, which causes it to not work.

Can confirm in 1.18 Pre-release 1.
Can confirm in 1.18.
Can confirm in 1.18.2 and 22w13a.
Can confirm in 1.19.2.

Can confirm in 23w14a.

Cannot reproduce in 1.21.72.
"Ambient Sound"?