EntityPlayer player = Minecraft.getMinecraft().thePlayer; World world = player.worldObj; world.playAuxSFXAtEntity(null, 10004, (int)player.posX, (int)player.posY, (int)player.posZ, 0);
Entity entity = ...; // get entity reference World world = entity.worldObj; world.playAuxSFXAtEntity(null, 2001, (int)entity.posX, (int)entity.posY, (int)entity.posZ, Block.getIdFromBlock(Blocks.tnt));The package library for the net.minecraft.world.World class is part of the Minecraft game's official source code.