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

Hi guys. I want to add some custom music to game (Im talking about music, that plaing randomly on background), but i don't know how i can do this. I was searching for some information about it and had found that some peoples were talking about SoundPool. But all these posts were about MC version 1.7.10 and lower. Where I can find something like SoundPool in 1.11.2 and how I can edit it to add my own music and maybe remove or replace some vanilla sounds?

Edited by CeperaProduction

  • Author
15 hours ago, TheSunCat said:

You would register a sound like you would for mon sounds and set its category to Ambient.

Ok, i'll try. But what about removing already existing vanilla sounds?

  • Author

Yea, I know about this event, I was already using it before. But it doesn't look like a good solution. I had created this topic to find another, more pretty way to do this.

Edited by CeperaProduction

I suggest looking at the classes in the net.minecraft.client.audio package.

 

You can probably use SoundHandler#getAccessor to get the SoundEventAccessor of a vanilla SoundEvent and use SoundEventAccessor#addSound to add a sound to it.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

  • Author
14 hours ago, Choonster said:

I suggest looking at the classes in the net.minecraft.client.audio package.

 

You can probably use SoundHandler#getAccessor to get the SoundEventAccessor of a vanilla SoundEvent and use SoundEventAccessor#addSound to add a sound to it.

Thanks, you made me go in right way.
By looking at theese classes and using some reflection, I have made all that i wanted.

 

Edited by CeperaProduction

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.