public static File unpackModFile(String pathModProtocol) {
		Matcher matcher = patternModProtocol.matcher(pathModProtocol);
		if (matcher.find()) {
			Mod mod = Terraria.managerMod.getMod(matcher.group(1));
			if (mod == null) return null;
			
			try {
				ZipFile zf = new ZipFile(new File("mods",mod.name+".jar"));
				BufferedInputStream bis = new BufferedInputStream(zf.getInputStream(zf.getEntry(matcher.group(2))));
				
				int b;
                byte[] buffer = new byte[1024];
                
                String[] spl = matcher.group(2).split("[/\\\\]");
                
                Matcher matcher2 = patternFileName.matcher(spl[spl.length-1]);
                if (matcher2.find()) {
	                File ret = File.createTempFile(matcher2.group(1),"."+matcher2.group(2));
	                
	                BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(ret),buffer.length);
	                while ((b = bis.read(buffer,0,1024)) != -1) bos.write(buffer,0,b);
	                bos.flush(); bos.close();
	                bis.close();
	                
	                return ret;
                }
			} catch (Exception e) {App.getApp().handle(e);}
		}
		return null;
	}