The Bug
When collecting honey from a bee's nest or hive in a bottle or by shearing, the 'bottle fills' or 'shears scrape' sound is played. The volume of this sound varies in accordance with the Friendly Creatures music and sounds slider, where as a block sound it should be controlled by the blocks slider.
Reproduce
locate a bee's nest or hive with honey level 5
Use an empty bottle item or a pair of shears on it with Blocks volume on 100% and Friendly Creatures volume on 0%,
Observe the lack of a sound for the action.
Repeat with the volume settings reversed and the sound will be audible.
Observed Behavior
The sound of collecting honey from beehives or bee nests is controlled by the "Friendly Creatures" sound slider.
Expected Behavior
The sound of collecting honey from beehives or bee nests would not be controlled by the "Friendly Creatures" sound slider.
Code Analysis
Code analysis by @unknown can be found in this comment.
Linked issues
Attachments
Comments 13
Here's a code analysis along with a potential fix regarding this issue. The following is based on a decompiled version of Minecraft 1.17.1 using MCP-Reborn.
Code Analysis:
net.minecraft.world.level.block.BeehiveBlock.java
...
$$0.playSound($$1, $$1.getX(), $$1.getY(), $$1.getZ(), SoundEvents.BEEHIVE_SHEAR, SoundSource.NEUTRAL, 1.0F, 1.0F);
...
$$0.playSound($$1, $$1.getX(), $$1.getY(), $$1.getZ(), SoundEvents.BOTTLE_FILL, SoundSource.NEUTRAL, 1.0F, 1.0F);
...
If we look at the above class, we can see that honey collecting sounds are sourced from SoundSource.NEUTRAL
, otherwise known as the "Friendly Creatures" sound slider.
Potential Fix:
Simply changing where honey collecting sounds are sourced from to SoundSource.PLAYERS
should resolve this problem. The correct line of code within its class should look something like the following:
net.minecraft.world.level.block.BeehiveBlock.java
...
$$0.playSound($$1, $$1.getX(), $$1.getY(), $$1.getZ(), SoundEvents.BEEHIVE_SHEAR, SoundSource.PLAYERS, 1.0F, 1.0F);
...
$$0.playSound($$1, $$1.getX(), $$1.getY(), $$1.getZ(), SoundEvents.BOTTLE_FILL, SoundSource.PLAYERS, 1.0F, 1.0F);
...
Can confirm in 21w03a.