The Bug
When a guardian attacks a player or a squid, the laser attack sound (and subtitle) will play at the same volume, even if the player is hundreds of blocks away.
Steps to Reproduce
Enter creative mode and locate a large body of water.
Summon both a guardian and squid in the water.
When the guardian begins to shoot the squid, quickly teleport yourself 75 blocks up into the sky.
/tp @s ~ ~75 ~
Listen closely and take note as to whether or not the minecraft:entity.guardian.attack sound lowers in volume depending on the distance between you and the guardian.
Observed Behavior
The minecraft:entity.guardian.attack sound doesn't lower in volume depending on the distance between you and the guardian.
Expected Behavior
The minecraft:entity.guardian.attack sound would lower in volume depending on the distance between you and the guardian.
Code analysis
Code analysis by @unknown can be found in this comment.
Related issues
is duplicated by
relates to
Attachments
Comments


still in 14w26b

still in 14w27b. In a small lake, spawn a bunch of squid and 1 or 2 guardians. Fly above it in creative mode, and you will hear the guardians even when you are far above them.

please reopen

This issue is present in the (as of date) latest snapshot 14w29b. This issue can be experienced by loading the seed 1122334455 where the player spawns on a tiny island surrounded by two Underwater Temples. They are quite a few blocks away, but visible from the island. The Guardian laser-beam sound is extremely loud from anywhere on the island.
If this is intended, it is the most annoying new addition to the game. I'll consider it a bug.

Still in 14w31a, the sound doesn't decrease in volume when farther away and also frequently clips

Still 14w32b, this needs reopen.

Confirmed in 14w34d.

Confirmed for 1.8-pre2.

Still in 1.8-pre3.

Still in Minecraft 1.8.

I'm experiencing it still in 1.8 too

Confirmed for 1.8.1-pre2.

Reopened.

Confirmed for 1.8.2 pre-3.

Is this still an issue in the current Minecraft Snapshot 15w45b or later? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases.

Can Confirm For 16w02a, very annoying

Confirmed for 16w06a.

Confirmed for 1.9 release

Confirmed for 1.10.2.

Happening to me on 1.10.2, the sound still plays when I quit to main menu and even when I load a world that is on peaceful difficulty.

Confirmed in 16w39a and 16w39b

Confirmed in 16w39c

Let's just call it feature. Mojang clearly doesn't care about this, it's been here since 2014.

The title should be changed to something like "Guardian Laser sound plays at same volume regardless of distance" to be more specific

Confirmed in 16w40a

Confirmed in 16w41a

Confirmed in 16w42a

Confirmed in 16w43a

Confirmed in 16w44a

Confirmed in 1.11-pre1

Confirmed in 1.11

This bug might be caused by the sound event not having a defined range or one that is too large; the subtitle "Guardian shoots" also appears when the player is far away from the source.

I've taken a look at the decompiled code (using MCP), and within GuardianSound.java it doesn't look to be taking distance or motion into account at all when it comes to the volume (unlike Minecarts). The only variable is based on the attack time and duration.
GuardianSound.java
float f = this.guardian.getAttackAnimationScale(0.0F);
this.volume = 0.0F + 1.0F * f * f;
EntityGuardian.java
public float getAttackAnimationScale(float p_175477_1_)
{
return ((float)this.clientSideAttackTime + p_175477_1_) / (float)this.getAttackDuration();
}

It's funny how I still get Emails about this thing even after 2 years, I didn't know that bug could be such a huge issue to fix 😃

Confirmed in 16w50a

Confirmed in 1.11.2

Confirmed for 17w13a (and 1.12-pre3).

So, you've basically took my credit for reporting this bug, like I never did? Interesting, isn't it obvious Mojang doesn't care about it. I've already finished college and got a job and this bug still isn't fixed, silly. I hope to see it fixed until my pension, even though I stopped playing Minecraft 2 years ago. Why is it so hard to send me a PM or email and at least ask, instead of just stealing?

If you can keep updating your report in the future you can have it back, otherwise we need someone else to take care of.

No, but do you think taking credit is right? Do you think I have time to update this bug on each snapshot release which is a really simple fix until I get retired in real life? I've reported the bug really long time ago and it's on them to fix it, it's not my problem, if they want to do it, they will, but obviously they won't fix this.

If that's an issue for you I just close this report and re-use one of the duplicates. Then we're both set.

I don't see what point you are trying to make there, please re-read my last sentence.
I just don't feel it's right to credit someone else while another person originally reported the bug. Without even asking me if I agree with that.

There is no credit in being the reporter of a bug, your name will not specifically mentioned or anything similar.
You said you stopped playing minecraft 2 years ago; why do you still want the ticket then?
The reporter of the ticket was changed so the ticket will actually be kept up to date, without needing a new comment for every version, this ticket isn't yours, never was, by using the bug tracker you report the issue to mojang, as such it is mojang's ticket, not yours.
Frankly, I don't even see the point in this argument, the ticket needed to be kept up to date, and to make that MUCH easier for all of us, we've changed the reporter to somebody who still plays the game, and has shown interest in the ticket/bug.

Then how about the "owner" of this ticket to show the interest in it and actually take care of it, it's like 2-3 lines of code fix.

Confirmed in 18w19b

Confirmed for 18w22c
Confirmed for 1.13-pre8
Confirmed for 1.13
Confirmed for 18w30b
Confirmed for 18w31a
Confirmed for 18w32a
Confirmed for 18w33a
Confirmed for 1.13.1-pre1

Confirmed for 18w44a

Confirmed for 19w03c

Confirmed for release 1.14. Once the guardian sounds reach a certain threshold (constant loop), they persist even after I travel thousands of blocks away. Only exiting and re-entering the world seems to clear the sound loop.

also confirmed for 1.14

confirmed for 1.14.1

Still in 1.14.3 Pre-Release 2

Still in 1.14.4 and 19w35a

Still in 19w42a

Still in 19w44a

Affects 20w11a

Affects 20w12a

Affects 20w13b

Affects 20w15a

I've changed you to the reporter; in case you didn't want this ticket let me know.

Can confirm in 20w48a.

This also affects 20w51a
Can confirm in 21w05b.
Can confirm in 21w06a.
Can confirm in 21w11a.
Can confirm in 21w17a.

Can confirm in 1.17

Can confirm in 1.17.1 Pre-release 1.
Can confirm in 1.17.1.
I am able to confirm this behavior in 21w41a. Here are some extra details regarding this problem.
The Bug:
The minecraft:entity.guardian.attack sound doesn't lower in volume depending on the distance between you and the guardian.
Steps to Reproduce:
Enter creative mode and locate a large body of water.
Summon both a guardian and squid in the water.
When the guardian begins to shoot the squid, quickly teleport yourself 75 blocks up into the sky.
/tp @s ~ ~75 ~
Listen closely and take note as to whether or not the minecraft:entity.guardian.attack sound lowers in volume depending on the distance between you and the guardian.
Observed Behavior:
The minecraft:entity.guardian.attack sound doesn't lower in volume depending on the distance between you and the guardian.
Expected Behavior:
The minecraft:entity.guardian.attack sound would lower in volume depending on the distance between you and the guardian.
Can confirm in 1.18.
Can confirm in 1.18.1.

Can confirm in 1.18.2 release candidate 1.
Can confirm in 1.18.2 and 22w11a.

In 22w13a.

can confirm in 1.19 pre-release 3
Can confirm in 1.19.2.

Is this issue related to MC-177741?
@unknown, hmm, I'm not too sure but I see where you're coming from. The wither spawning sound is considered a global sound event, therefore allowing it to be heard by all players regardless of the dimensions that they're in, or how far away from the sound origin point they are. This is why I think MC-177741 is in fact intentional. On the other hand, guardian sounds are not considered global sound events and instead just don't decrease in volume in regards to how far away you are from the sound origin point.

Сan confirm in 23w44a. Also work with elder guardian.

1.20.2 12/13/23 verified still an issue

Can confirm in 1.21.3. Creeped me out.

Version 1.21.1 still bugging with this. Going crazy 😄