Jump to content

Forge Play Sound


Sinon434Real

Recommended Posts

So i'm trying to play sound at a player when they die using 

Minecraft.getMinecraft().getSoundHandler().playSound(sound);

but it only plays at the players location, so if they for example fall into the void and die, the sound plays in the void, so they can't hear it.

How can i play a sound without it playing at the players location?

Link to comment
Share on other sites

There are actually a lot of different methods for playing sounds and they also have different behavior depending on whether they called on the server or client. Here is some official documentation to help sort it out: https://mcforge.readthedocs.io/en/latest/effects/sounds/#playing-sounds

Check out my tutorials here: http://jabelarminecraft.blogspot.com/

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.