Jump to content

Recommended Posts

Posted (edited)

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
Posted (edited)

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
Posted

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.

Posted (edited)
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...

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