Jump to content

Recommended Posts

Posted

How much of my code? I'll just put the @Mod Class file (which contains the sounds).

 

  Reveal hidden contents

 

Posted

When you paste anything longer than 5-6 lines of code, please don't do it like that!

It's impossible to read clearly without copy pasting it to somewhere else :P

 

Use paste.minecraftforge.com and creat something like this:

 

http://paste.minecraftforge.net/view/ea67dfa5

 

A lot easier for diesieben07 and others to help you with your code when they can easily read it :)

 

  Quote

If you guys dont get it.. then well ya.. try harder...

Posted

I've made a new class to hold all my sounds:

 

http://pastebin.com/P7ugCZD6

 

It's not giving me an error in the console (it wasn't before either) and "EmeraldsPlusF" is a package that will be exported in the .zip file.

 

Also I added this to my PreInit method:

MinecraftForge.EVENT_BUS.register(new EPSoundEvents());

 

The sounds still don't work though.... Also I don't understand what you mean in your third suggestion.

Posted

So did I register the EventHandler? Also this is my PreInit method:

 

  Reveal hidden contents

 

Posted

I play one sound here:

 

  Reveal hidden contents

 

 

and the other one (onItemUse):

http://pastebin.com/nX7JBkaE

 

Also I separated all my Blocks and Items into different class files but they don't work now (the items and blocks).

Here are the files; @Mod:

http://pastebin.com/YeJZX0Wk

 

Block Class:

http://pastebin.com/C79ApyCw

 

Item Class:

http://pastebin.com/c3JxYnm9

Posted

You forgot to set syntax highlighting to Java, so it's all black and white :P

 

Heres the @mod file fixed:

http://pastebin.com/QaXvYWfU

 

the other one(onItemUse):

http://pastebin.com/hvfPrJkH

 

 

 

Okay I stopped there after looking at your Block file, I have no idea what's going on, it seems like a new mod file again?

Also the line you said is playing the sound, ain't playing sound it is just instantiating a new ItemEPRecord to the variable GCRecord?

 

  Quote

If you guys dont get it.. then well ya.. try harder...

Posted

Well for the item and block classes I just transferred over the stuff that was in my @Mod file to two new classes. Was that not what I was supposed to do? Also the ItemEPRecord is a edited version of ItemRecord. I made this so I could put in a different artist name--so it would be ItemEPRecord(id, "Name", "Artist"). That worked perfectly fine until yesterday. So the GCRecord is a record that you put in a jukebox, not a item that you're supposed to right click with and it make sound.

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.