Question about *adding* new sounds

View previous topic View next topic Go down

Question about *adding* new sounds

Post  KungFuHamster on 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

View user profile

Back to top Go down

Re: Question about *adding* new sounds

Post  Tei on 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

View user profile http://mcdocs.team-talk.net

Back to top Go down

Re: Question about *adding* new sounds

Post  KungFuHamster on 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

View user profile

Back to top Go down

Re: Question about *adding* new sounds

Post  Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

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