private void downloadAndInstallResource(URL var1, String var2, long var3, int var5) {
      try {
         int var6 = var2.indexOf("/");
         String var7 = var2.substring(0, var6);
         if(!var7.equals("sound") && !var7.equals("newsound")) {
            if(var5 != 1) {
               return;
            }
         } else if(var5 != 0) {
            return;
         }

         File var8 = new File(this.resourcesFolder, var2);
         if(!var8.exists() || var8.length() != var3) {
            var8.getParentFile().mkdirs();
            String var9 = var2.replaceAll(" ", "%20");
            this.downloadResource(new URL(var1, var9), var8, var3);
            if(this.closing) {
               return;
            }
         }

         this.mc.installResource(var2, var8);
      } catch (Exception var10) {
         var10.printStackTrace();
      }

   }