-
Bug
-
Resolution: Duplicate
-
None
-
1.16.2
-
Unconfirmed
-
(Unassigned)
When listening closely to the music from a jukebox it becomes obvious that the music is not coming from the center of the block, but from the corner.
What I expected to happen:
I expected the music to come from the center of the jukebox, as all sides show a speaker-like texture (so the most logic place for the sound to come from is the center) and the slot where the music disc goes into the jukebox is also positioned in the center of the block.
What actually happened:
The music came out of the lower, north-west corner of the jukebox. This is barely/not hearable when at a range of more than two blocks away from the jukebox, but when listening closely with a stereo headset it becomes pretty obvious that the sound is not correctly positioned.
To reproduce:
The effect is best hearable through a stereo-supporting headset.
- Place down a jukebox
- Put a random music disc in the jukebox
- Do a little dance unless you play 11 or 13
- Teleport on top of the jukebox, right in the center
- Turn around while looking straight down and hear that the sound source position changes relative to you
This should not happen when the music is supposed to come from the center - Now move to the corner at the north-west side of the jukebox
- Turn around again and hear the sound not moving at all
This means the sound source is positioned at the corner of the jukebox, and not in the center
Probable fix:
Looking at the code this Jukebox issue can be easily fixed. Decompiling the code (with Mojang mappings) I see this in LevelRenderer.playStreamingSound(...):
soundinstance = SimpleSoundInstance.forRecord(soundevent, blockpos.getX(), blockpos.getY(), blockpos.getZ());
While, to make the sound come from the correct position: the center, an offset of 0.5 should be added to each coordinate of the sound source:
soundinstance = SimpleSoundInstance.forRecord(soundevent, blockpos.getX() + 0.5f, blockpos.getY() + 0.5f, blockpos.getZ() + 0.5f);
- duplicates
-
MC-152752 Jukebox music sound originates from north-west edge of the block
- Resolved