The bug
The minecraft:block.portal.trigger sound is played whenever the player intersects a minecraft:nether_portal block, and is intended to accompany the intensifying screen overlay as to indicate the dimensional teleportation process. However, if the player then un-intersects the portal block, such as by stepping out of the portal or quickly walking through the portal without intent to cross dimensions, the sound will still play to completion.
This behaviour is undesirable for several reasons:
The player is no longer in the process of being teleported, and as such the continued playback of the sound is useless.
The screen overlay effect that accompanies the sound is cancelled as expected upon leaving the portal, as the player no longer teleports.
The sound is a very major annoyance if, for example, a room is built on the opposite side of the portal in the same dimension such that the portal is to be passed through but not utilized in order to access this room.
How to reproduce
Create a nether portal, or encounter a minecraft:nether_portal block in some other way such as via /setblock
Intersect a portal block in the Survival gamemode
Immediately un-intersect yourself from the portal block in order to abort teleportation
Expected results
The loud sound that plays when the player is inside of a portal would stop playing and therefore would not reach its cacophonous climax.
Actual results
The absolutely deafening sound plays in full even when you've distanced yourself from the portal considerably in the meantime.
Thank you for your report!
We're tracking this issue in MC-104964, so this ticket is being resolved and linked as a duplicate.
If you would like to add a vote and any extra information to the main ticket it would be appreciated.
If you haven't already, you might like to make use of the search feature to see if the issue has already been mentioned.
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki