MCDOCS
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Question about *adding* new sounds

2 posters

Go down

Question about *adding* new sounds Empty Question about *adding* new sounds

Post  KungFuHamster Wed Oct 20, 2010 9:06 am

So I created a new mob that is a separate entity from the rest, but the sounds don't work. If you look at mz.class for example, the chicken class, you'll see lines like:

Code:
return "mob.chicken";

return "mob.chickenhurt";

ag.a(this, "mob.chickenplop", 1.0F, (aQ.nextFloat() - aQ.nextFloat()) * 0.2F + 1.0F);

From this template, it appears that the "." character is replaced internally by Minecraft when searching for sounds; the mob sounds are located in \resources\newsound\mob and are named like:

Code:
chicken1.ogg
chicken2.ogg
chickenhurt1.ogg
chickenplop.ogg

I added new sounds for my new mob, but the sounds won't play. My new entity has lines like:

Code:
return "mob.duck";
return "mob.duckhurt";

The duck is patterned precisely after the chicken, yet the sounds don't play. They are in the \mob folder with the rest of the mob sounds, named according to the same pattern.

Any ideas?

KungFuHamster

Posts : 11
Join date : 2010-10-15

Back to top Go down

Question about *adding* new sounds Empty Re: Question about *adding* new sounds

Post  Tei Wed Oct 20, 2010 10:01 am

At this point, I have no idea how the system work.

So, I just have paranoid ideas, totally baseless.

Try to use the names duck1.ogg, duck.ogg. Did you corretly named the files?
You can run the game trough filemon (from sysinternals) to check what files are tryiing to open.
Make sure use the same encoding ( mono, stereo, speed, etc..)
Do the engine need to do some pre-procesing? you could make so the sheep use duck.ogg, and your duck use sheep, and see if the sheep can use the sound, or your duck can do moo. Actually, don't do that, will render you crazy.

Tei
Admin

Posts : 32
Join date : 2010-10-15

https://mcdocs.forumotion.com

Back to top Go down

Question about *adding* new sounds Empty Re: Question about *adding* new sounds

Post  KungFuHamster Wed Oct 20, 2010 10:25 pm

I tried tracing back the function in bf.class that loads the Amazon XML file with the list of all the sounds (http://s3.amazonaws.com/MinecraftResources/) but I'm making my eyes bleed.

bf:
private void a(java.net.URL url, java.lang.String s, long l, int i)
-> b.a(s, file);

KungFuHamster

Posts : 11
Join date : 2010-10-15

Back to top Go down

Question about *adding* new sounds Empty Re: Question about *adding* new sounds

Post  Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum