-
Bug
-
Resolution: Unresolved
-
None
-
1.19.2, 1.19.3, 1.19.4, 1.20.1, 1.20.2, 23w43b, 1.20.4, 24w03b
-
None
-
Confirmed
-
Sound
Attenuation distance controls how far away a sound can be heard before it's silent. This works properly with type "sound" (default) entries, but not with type "event" entries; it'll use the parent's attenuation distance, rather than using the event's, or multiplying with it (divided by 16).
Steps to reproduce:
- Create a sounds.json with the following:
{ "custom.parent": { "sounds": [ { "name": "mob/zombie/hurt2" } ] }, "custom.event": { "sounds": [ { "type": "event", "name": "custom.parent", "attenuation_distance": 2 } ] }, "custom.sound": { "sounds": [ { "name": "mob/zombie/hurt2", "attenuation_distance": 2 } ] } }
- Logic dictates that custom.sound and custom.event both have an attenuation distance of 2 blocks.
- Use /playsound custom.sound master @s ~ ~ ~ and /playsound custom.sound master @s ~ ~ ~3
- Observe how the first command's sound can be heard, but the second one can't
- Use /playsound custom.event master @s ~ ~ ~ and /playsound custom.event master @s ~ ~ ~3
- Observe how the both command's sound can be heard.
Expected result:
custom.event has an attenuation distance of 2 blocks.
Actual result:
custom.event has an attenuation distance of the default value of 16 blocks because that's what custom.parent's attenuation distance is.