Jump to content

Recommended Posts

Posted

Wracking my brain and losing sleep so I need a sanity check!

 

I have a custom mob, based on EntityZombie (EntityBeavis)

 

  • I created the "sounds.json" file at the root of my asset folder (testmod) [example below]
  • put the ogg file in the sounds folder  (beavis_cornholio.ogg)
  • sounds folder is in 'assets/testmod'
  • called the custom sound by overriding the "playLivingSound" method referencing modid:event ("testmod:beavisliving")

 

When I run the code, the error I get is "Unable to play unknown soundEvent testmod:beavisliving

 

I know its gotta be something stupid but I'm just not seeing it.

 

EntityBeavis.java

package net.chonacky.minecraft.mod.testmod.bb;


import net.chonacky.minecraft.mod.testmod.Main;
import net.minecraft.entity.monster.EntityZombie;
import net.minecraft.world.World;

public class EntityBeavis extends EntityZombie {


	private String livingSound = Main.MODID+":beavisliving" ; //MODID = "testmod"

	public EntityBeavis(World worldIn) {

		super(worldIn);
		this.setCustomNameTag("Let's Burn Something!");
		
	}
	
	@Override
	public void playLivingSound() {
		
	 this.playSound(livingSound, this.getSoundVolume(), this.getSoundPitch());

	}
	
}

 

Here is the sounds.json file:

{
"beavisliving": 
	{
	"category": "master",
	"sounds": 
		[{"name":"beavis_cornholio"}
		]
	}
}

 

Posted

1.7.10 is no longer supported here.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

  • Guest locked this topic
Guest
This topic is now closed to further replies.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.