Jump to content

SharYbia

Members
  • Posts

    3
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

SharYbia's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Nevermind this question. I realised how much of an idiot I was since I could just look at the EntityFireworkRocket and see how they did it there... For the people wondering, it has to be fireworks.launch instead of fireworks.launch1
  2. Hello! I've run into a problem when trying to add a fireworks sound to one of my items. Here is the code I'm using: public ItemStack onItemRightClick(ItemStack par1ItemStack, World world, EntityPlayer par3EntityPlayer) { if (!par3EntityPlayer.capabilities.isCreativeMode) { --par1ItemStack.stackSize; } world.playSoundAtEntity(par3EntityPlayer, "fireworks.launch1", 0.5F, 0.4F); if (!world.isRemote) { Vec3 look = par3EntityPlayer.getLookVec(); EntitySDRune wskull = new EntitySDRune(world, par3EntityPlayer, 1, 1, 1); wskull.setPosition( par3EntityPlayer.posX, par3EntityPlayer.posY + 1.620, par3EntityPlayer.posZ); wskull.accelerationX = look.xCoord * 0.1; wskull.accelerationY = look.yCoord * 0.1; wskull.accelerationZ = look.zCoord * 0.1; world.spawnEntityInWorld(wskull); } return par1ItemStack; } This is the line that should add the sound: world.playSoundAtEntity(par3EntityPlayer, "fireworks.launch1", 0.5F, 0.4F); fireworks.launch1 is a default minecraft sound (the sound when you launch a fireworks rocket). But for some reason this doesn't work. Whenever I replace the fireworks.launch1 with random.bow it does play a bowsound. Does anyone know what I did wrong here? I've been stuck on this londer than I'd like to admit
×
×
  • Create New...

Important Information

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