Jump to content

[1.7.2] Custom Music Discs


burnner

Recommended Posts

Well I made it

 

1. The sounds.json has to be located in your mods asset folder.

2. You can but the records in yourmodname/sounds/records/

3. You have to add the soundfiles to your sounds.json like this:

 

{
  "itsherobrine": {
    "category": "record",
    "sounds": [
      {
        "name": "sounds/records/itsherobrine",
        "stream": true
      }
    ]
  }
}

 

4. Make your own Record class that extends from ItemRecord (because the constructor is invisible)

5. The name of your record has to be: yourmodname:yourrecordname

Link to comment
Share on other sites

  • 4 weeks later...

hey, I know the problem seems to be already solved, however, I thought you have to override   

    
public ResourceLocation getRecordResource(String name)
    {
        return new ResourceLocation(name);
    }

so it leads minecraft to your own folder, i tried to override it in my own class

    
@Override
public ResourceLocation getRecordResource(String name)
    {
        return new ResourceLocation("MyModName:" + name);
    }

 

I'v put the wait.ogg in assets.mymodname.sounds.records and open the class in my modfile with

	public static Item record = new Record("wait");

soooooooooooooooooo, unfortunatly I get an error:

[14:38:24] [Client thread/WARN]: Unable to play unknown soundEvent: mymodname:records.wait

What am I doing wrong?

(I'm pretty new to Java and mc modding so don't cry if i made any horrible mistakes  ;) )

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.