Play sound after teleporting to dimension?

Started by TheTank2007 on

Topic category: Help with modding (Java Edition)

Last seen on 19:01, 20. Oct 2024
Joined Sep 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Play sound after teleporting to dimension?

I'm making a potion that sends you back to your spawn point (and adds a weakness effect afterwards). I have it play a sound after you get teleported:

 

Code that sets the location of the player and plays a sound effect

This works fine from overworld to overworld, but when going from any other dimension to the overworld, the sound simply doesn't play.

Last seen on 18:59, 20. Oct 2024
Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Probably because the xyz of…
Sun, 10/20/2024 - 18:53

Probably because the xyz of the sound is playing at that xyz in the original dimension.

Last seen on 19:36, 20. Oct 2024
Joined Dec 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Yeah try using a wait block
Sun, 10/20/2024 - 19:25

Yeah try using a wait block