Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (โ‹ฎ) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

Hello, so i was about to add custom background music to my new dimension although I noticed that all the sound events where deprecated. is there one that is actually usable?

  • Author

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)

  • Author

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);
			}
		}

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).

  • Author

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).

Adding music and sounds is done via json lists. No hacking needed.

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team onย Patreon

  • Author

Adding music and sounds is done via json lists. No hacking needed.

ย 

Oh no, its not about adding them to the game. It is about actually playing one as background music in my dimension.

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions โ†’ Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.