Jump to content

Modded Record not playing sound


SparkyFox95

Recommended Posts

9 minutes ago, diesieben07 said:
  • Why did you extend ItemRecord and copy-paste it into your class? Only do the former.
  • What's your sounds.json?
  • ModSoundEvent::init / ModSoundEvent::register are never called.
  • Your main mod class is a giant mess. Lots of empty auto-generated methods that do nothing and the formatting is all over the place.
  • Your way of registering models is outdated and broken. Use ModelLoader.setCustomModelResourceLocation only.

1. because I tried without the parts I copied and that didn't work at all
 

        "mus_battle2": {
        "category": "master",
        "sounds": [
        {"name":"servermod:mus_battle2", "stream": true}
        ],
           
        "subtitle": "Enemy appears"
    }
}   

3. I thought my smg needed that? but ok
4. that's not my main mod class, but it's neat/"organised" enough for me to understand
5. I was only following what I was told in a 1.11.2 tutorial

Edited by SparkyFox95
Link to comment
Share on other sites

50 minutes ago, diesieben07 said:

So then why did you not try to just delete the class? Because that an equally (in-)adequate solution to "it didn't work".

 

What are you talking about?

 

Then that tutorial is wrong and you should drop it immediately and yell at it's author to stop being stupid.

  • the game works fine and runs on a server...
  • its doesn't matter, about the SMG's custom sound, its getting the custom record to play mus_battle2
  • ....no.... the guy has actually been the most helpful out of all other tutorials I've seen, plus, theres no need for yelling at someone that spends hours of their busy life setting up a tutorial for people

===


Is anyone able to help? I got a feeling it has something todo with this this line;
 

@Override
public ResourceLocation getRecordResource(String name){
return new ResourceLocation(ServerMod.MOD_ID, "RECORD_Battle2");}

I've tried ServerMod.Resource_Prefix...

Edited by SparkyFox95
Link to comment
Share on other sites

You need to look into the jukebox's code, set a breakpoint or two and step through what happens when you pop your disc into it. In particular, you need to see whether the handling derails on the server or spawns a message to the client to be derailed there.

 

If the latter, then you need to hunt down the message handler and set another breakpoint or two and run again in the debugger. The vanilla handler might be making an assumption that simply does not support having discs beyond the vanilla ones (The situation with paintings is like that).  In such cases, custom handlers or even custom messages may be required.

Edited by jeffryfisher

The debugger is a powerful and necessary tool in any IDE, so learn how to use it. You'll be able to tell us more and get better help here if you investigate your runtime problems in the debugger before posting.

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.