Charmonium icon indicating copy to clipboard operation
Charmonium copied to clipboard

[Suggestion] Add a conditional check for player distance from portal before playing ambient dimensional sounds

Open HipHopHuman opened this issue 4 years ago • 3 comments

Minecraft Version: 1.15.2 Mod Loader / Version: forge-31.2.36 Charm Version: Charm-1.15.2-1.5.9 Charmonium Version: 1.15.2-1.0.1

Details: First off, thanks for this mod (and Charm and Strange) - they add so much depth to the Vanilla experience that I cannot even fathom the words to describe how appreciative I am of the work you have put in here.

The reason I am suggesting this is because of how your mod interacts with Immersive Portals. In case you haven't seen it, Immersive Portals allows the player to seamlessly transition between dimensions without a loading screen by just walking through. It accomplishes this by keeping the chunks surrounding the portal in the destination dimension loaded. This causes a rather annoying issue in Charmonium, where if the player has opened a portal, the alternate dimension's ambient sounds propagate to the player's current dimension.

So, Overworld ambient sounds play in the Nether, and Nether ambient sounds play in the Overworld. These ambient sounds persist regardless of how far the player travels away from the portal. It seems to happen more often with the Nether sounds in the Overworld, but occasionally this issue ocurrs in the Nether as well, where birds can still be heard chirping, although its harder to reproduce.

I think the same issue might also occur with the Better Portals mod, but I have not tested it.

My suggestion is to add a conditional check to the code that determines when these ambient sounds can play. A satisfactory conditional would check if the player is currently standing in the dimension before playing its associated sound. A more immersive conditional that is better implemented would check if the player is standing within X distance from a portal, and increase the volume the closer the player is to the portal. These conditionals would supplement the existing check for if the dimension is loaded, so as not to break existing functionality.

Steps to reproduce:

  1. Install Forge
  2. Install Charm
  3. Install Charmonium
  4. Install Immersive Portals
  5. Build a Nether Portal
  6. Listen
  7. Go through the portal
  8. Listen
  9. Travel considerable distance
  10. Listen
  11. Go back through the Nether Portal
  12. Travel considerable distance
  13. Listen

Brief Video of the Issue (Click the image): (My recording software bugged out so unfortunately this is the best I could do) image

HipHopHuman avatar Sep 06 '20 19:09 HipHopHuman

Thanks for the ticket and instructions. This got totally lost in the backlog somehow. We will look at building this into an upcoming version.

svenhjol avatar Dec 05 '20 20:12 svenhjol

Ambient sounds are now handled properly when moving through IP portals as of 2.2.0.

svenhjol avatar Dec 23 '20 04:12 svenhjol

Thanks, @svenhjol - It works great!

HipHopHuman avatar Jan 03 '21 17:01 HipHopHuman