Jump to content

[1.7.10] All sound events are deprecated


nexusrightsi

Recommended Posts

So, instead of using a tick event i used the onLivingUpdate event where it just checks if the player is in the dimension and if it is then it starts playing the music. this resulted in no errors although in game its acting kind of weird. Even though I have no code checking for if the player is in a gui the music only seems to play when its in the menu gui (escape button)

Link to comment
Share on other sites

Still haven't solved the sound playing in the escape button menu.. this is literally all the code im using for it:

if(ent.dimension == ARMain.dimensionId)
		{
			if(!ent.worldObj.isRemote)
			{
				ent.worldObj.playSound(ent.posX, ent.posY, ent.posZ, "annoyingrodents:icarusBackground", 1, 1, true);
			}
		}

Sounds are client side. When you call playSound on server, it just notifies clients. Also, this method is used to play positioned sound (not music).

Link to comment
Share on other sites

Still haven't solved the sound playing in the escape button menu.. this is literally all the code im using for it:

if(ent.dimension == ARMain.dimensionId)
		{
			if(!ent.worldObj.isRemote)
			{
				ent.worldObj.playSound(ent.posX, ent.posY, ent.posZ, "annoyingrodents:icarusBackground", 1, 1, true);
			}
		}

so what would be your advice of doing it? I mean the only way to play sound/music that I knew of were the sound events and these playsound methods in the world class.

Sounds are client side. When you call playSound on server, it just notifies clients. Also, this method is used to play positioned sound (not music).

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.