diff --git a/fml/commands.patch b/fml/commands.patch index 44efb7c02d..02e99508dc 100644 --- a/fml/commands.patch +++ b/fml/commands.patch @@ -9,7 +9,7 @@ if not sys.platform.startswith('win'): if os.path.exists(path): shutil.rmtree(path) -@@ -582,6 +584,9 @@ +@@ -584,6 +586,9 @@ self.has_astyle_cfg = False if os.path.isfile(self.astyleconf): self.has_astyle_cfg = True @@ -19,7 +19,7 @@ def creatergcfg(self, reobf=False, keep_lvt=False, keep_generics=False, rg_update=False): """Create the files necessary for RetroGuard""" -@@ -779,7 +784,8 @@ +@@ -781,7 +786,8 @@ testlk = {CLIENT: self.testclient, SERVER: self.testserver} if not os.path.exists(os.path.join(srclk[side], os.path.normpath(testlk[side] + '.java'))): @@ -29,7 +29,7 @@ return True def checkbins(self, side): -@@ -1027,6 +1033,10 @@ +@@ -1029,6 +1035,10 @@ pathsrclk = {CLIENT: self.srcclient, SERVER: self.srcserver} pathlog = {CLIENT: self.clientrecomplog, SERVER: self.serverrecomplog} @@ -40,7 +40,7 @@ if not os.path.exists(pathbinlk[side]): os.makedirs(pathbinlk[side]) -@@ -1039,6 +1049,7 @@ +@@ -1041,6 +1051,7 @@ all_files = True append_pattern = False pkglist = filterdirs(pathsrclk[side], '*.java', append_pattern=append_pattern, all_files=all_files) @@ -48,7 +48,7 @@ dirs = ' '.join(pkglist) classpath = os.pathsep.join(cplk[side]) forkcmd = self.cmdrecomp.format(classpath=classpath, sourcepath=pathsrclk[side], outpath=pathbinlk[side], -@@ -1060,7 +1071,7 @@ +@@ -1062,7 +1073,7 @@ raise def startserver(self): @@ -57,7 +57,7 @@ classpath = [os.path.join('..', p) for p in classpath] classpath = os.pathsep.join(classpath) os.chdir(self.dirjars) -@@ -1068,7 +1079,7 @@ +@@ -1070,7 +1081,7 @@ self.runmc(forkcmd) def startclient(self): @@ -66,7 +66,7 @@ classpath = [os.path.join('..', p) for p in classpath] classpath = os.pathsep.join(classpath) natives = os.path.join('..', self.dirnatives) -@@ -1195,20 +1206,20 @@ +@@ -1197,20 +1208,20 @@ with open(self.csvmethods, 'rb') as fh: methodsreader = csv.DictReader(fh) for row in methodsreader: @@ -90,7 +90,7 @@ names['params'][row['param']] = row['name'] regexps = { -@@ -1238,6 +1249,11 @@ +@@ -1240,6 +1251,11 @@ # HINT: We pathwalk the sources for path, _, filelist in os.walk(pathsrclk[side], followlinks=True): @@ -102,7 +102,7 @@ for cur_file in fnmatch.filter(filelist, '*.java'): updatefile(os.path.normpath(os.path.join(path, cur_file))) return True -@@ -1320,12 +1336,14 @@ +@@ -1322,12 +1338,14 @@ pathsrclk = {CLIENT: self.srcclient, SERVER: self.srcserver} strip_comments(pathsrclk[side]) @@ -117,7 +117,7 @@ def process_javadoc(self, side): """Add CSV descriptions to methods and fields as javadoc""" -@@ -1334,6 +1352,21 @@ +@@ -1336,6 +1354,21 @@ if not self.has_doc_csv: self.logger.warning('!! javadoc disabled due to no csvs !!') return False @@ -139,7 +139,7 @@ #HINT: We read the relevant CSVs methodsreader = csv.DictReader(open(self.csvmethods, 'r')) -@@ -1342,13 +1375,13 @@ +@@ -1344,13 +1377,13 @@ methods = {} for row in methodsreader: #HINT: Only include methods that have a non-empty description @@ -155,7 +155,7 @@ fields[row['searge']] = row['desc'].replace('*/', '* /') regexps = { -@@ -1420,12 +1453,13 @@ +@@ -1422,12 +1455,13 @@ # HINT: We create the list of source directories based on the list of packages pkglist = filterdirs(pathsrclk[side], '*.java', append_pattern=True) @@ -170,7 +170,7 @@ if not reobf: md5lk = {CLIENT: self.md5client, SERVER: self.md5server} else: -@@ -1440,6 +1474,9 @@ +@@ -1442,6 +1476,9 @@ class_path = '' else: class_path += '/' @@ -180,7 +180,7 @@ for class_file in fnmatch.filter(filelist, '*.class'): class_name = class_path + os.path.splitext(class_file)[0] bin_file = os.path.normpath(os.path.join(path, class_file)) -@@ -1592,6 +1629,9 @@ +@@ -1594,6 +1631,9 @@ sys.exit(1) for entry in newfiles: @@ -190,7 +190,7 @@ if entry[3] == 'U': self.logger.info('Retrieving file from server : %s', entry[0]) cur_file = os.path.normpath(entry[0]) -@@ -1612,6 +1652,9 @@ +@@ -1614,6 +1654,9 @@ md5reoblk = {CLIENT: self.md5reobfclient, SERVER: self.md5reobfserver} outpathlk = {CLIENT: self.srcmodclient, SERVER: self.srcmodserver} src = {CLIENT: self.srcclient, SERVER: self.srcserver} @@ -200,7 +200,7 @@ # HINT: We need a table for the old md5 and the new ones md5table = {} -@@ -1654,3 +1697,6 @@ +@@ -1656,3 +1699,6 @@ except IOError: self.logger.error('* File %s copy failed', in_class) diff --git a/fml/common/cpw/mods/fml/common/FMLCommonHandler.java b/fml/common/cpw/mods/fml/common/FMLCommonHandler.java index 9d0a5bd7e1..1e9dd56894 100644 --- a/fml/common/cpw/mods/fml/common/FMLCommonHandler.java +++ b/fml/common/cpw/mods/fml/common/FMLCommonHandler.java @@ -230,6 +230,11 @@ public class FMLCommonHandler Builder brd = ImmutableList.builder(); brd.add(Loader.instance().getMCVersionString()); brd.add(Loader.instance().getFMLVersionString()); + String forgeBranding = (String) callForgeMethod("getVersion"); + if (!Strings.isNullOrEmpty(forgeBranding)) + { + brd.add(forgeBranding); + } brd.addAll(sidedDelegate.getAdditionalBrandingInformation()); try { Properties props=new Properties(); diff --git a/fml/common/cpw/mods/fml/relauncher/CoreFMLLibraries.java b/fml/common/cpw/mods/fml/relauncher/CoreFMLLibraries.java index 6620614377..e5f6949fe9 100644 --- a/fml/common/cpw/mods/fml/relauncher/CoreFMLLibraries.java +++ b/fml/common/cpw/mods/fml/relauncher/CoreFMLLibraries.java @@ -20,7 +20,7 @@ public class CoreFMLLibraries implements ILibrarySet @Override public String getRootURL() { - return "http://cloud.github.com/downloads/cpw/FML/%s"; + return "http://files.minecraftforge.net/fmllibs/%s"; } } diff --git a/fml/common/cpw/mods/fml/relauncher/Downloader.java b/fml/common/cpw/mods/fml/relauncher/Downloader.java index 6b796a40c5..c68e72b198 100644 --- a/fml/common/cpw/mods/fml/relauncher/Downloader.java +++ b/fml/common/cpw/mods/fml/relauncher/Downloader.java @@ -41,6 +41,8 @@ public class Downloader extends JOptionPane private JDialog container; private JLabel currentActivity; private JProgressBar progress; + boolean stopIt; + Thread pokeThread; public Downloader() { @@ -117,6 +119,11 @@ public class Downloader extends JOptionPane { container.dispose(); } + stopIt = true; + if (pokeThread != null) + { + pokeThread.interrupt(); + } } void updateProgressString(String progressUpdate, Object... data) diff --git a/fml/common/cpw/mods/fml/relauncher/FMLRelauncher.java b/fml/common/cpw/mods/fml/relauncher/FMLRelauncher.java index 71b6bdb391..0d5555ed41 100644 --- a/fml/common/cpw/mods/fml/relauncher/FMLRelauncher.java +++ b/fml/common/cpw/mods/fml/relauncher/FMLRelauncher.java @@ -103,6 +103,10 @@ public class FMLRelauncher } } + if (RelaunchLibraryManager.downloadMonitor.stopIt) + { + System.exit(1); + } try { ReflectionHelper.findMethod(client, null, new String[] { "fmlReentry" }, ArgsWrapper.class).invoke(null, wrap); @@ -288,6 +292,10 @@ public class FMLRelauncher popupWindow.setVisible(false); popupWindow.dispose(); } + if (RelaunchLibraryManager.downloadMonitor.stopIt) + { + System.exit(1); + } try { ReflectionHelper.findMethod(appletClass, newApplet, new String[] { "fmlStartReentry" }).invoke(newApplet); diff --git a/fml/common/cpw/mods/fml/relauncher/RelaunchLibraryManager.java b/fml/common/cpw/mods/fml/relauncher/RelaunchLibraryManager.java index cddfe66f36..22af78428c 100644 --- a/fml/common/cpw/mods/fml/relauncher/RelaunchLibraryManager.java +++ b/fml/common/cpw/mods/fml/relauncher/RelaunchLibraryManager.java @@ -8,6 +8,7 @@ import java.io.FileOutputStream; import java.io.FilenameFilter; import java.io.IOException; import java.io.InputStream; +import java.io.InterruptedIOException; import java.lang.reflect.Method; import java.math.BigInteger; import java.net.MalformedURLException; @@ -165,6 +166,10 @@ public class RelaunchLibraryManager } finally { + if (downloadMonitor.stopIt) + { + return; + } if (!caughtErrors.isEmpty()) { FMLRelaunchLog.severe("There were errors during initial FML setup. " + @@ -257,7 +262,6 @@ public class RelaunchLibraryManager { // Load in the Loader, make sure he's ready to roll - this will initialize most of the rest of minecraft here System.out.println("A CRITICAL PROBLEM OCCURED INITIALIZING MINECRAFT - LIKELY YOU HAVE AN INCORRECT VERSION FOR THIS FML"); - e.printStackTrace(); throw new RuntimeException(e); } } @@ -422,6 +426,7 @@ public class RelaunchLibraryManager downloadMonitor.updateProgressString(infoString); FMLRelaunchLog.info(infoString); URLConnection connection = libDownload.openConnection(); + connection.setRequestProperty("User-Agent", "FML Relaunch Downloader"); int sizeGuess = connection.getContentLength(); performDownload(connection.getInputStream(), sizeGuess, hash, libFile); downloadMonitor.updateProgressString("Download complete"); @@ -429,8 +434,13 @@ public class RelaunchLibraryManager } catch (Exception e) { + if (downloadMonitor.stopIt) + { + FMLRelaunchLog.warning("You have stopped downloads in progress"); + return; + } if (e instanceof RuntimeException) throw (RuntimeException)e; - FMLRelaunchLog.severe("There was a problem downloading the file %s automatically. Perhaps you" + + FMLRelaunchLog.severe("There was a problem downloading the file %s automatically. Perhaps you " + "have an environment without internet access. You will need to download " + "the file manually\n", libFile.getName()); libFile.delete(); @@ -460,19 +470,31 @@ public class RelaunchLibraryManager downloadMonitor.resetProgress(sizeGuess); try { + downloadMonitor.pokeThread = Thread.currentThread(); byte[] smallBuffer = new byte[1024]; while ((bytesRead = is.read(smallBuffer)) >= 0) { downloadBuffer.put(smallBuffer, 0, bytesRead); fullLength += bytesRead; + if (downloadMonitor.stopIt) + { + break; + } downloadMonitor.updateProgress(fullLength); } is.close(); + downloadMonitor.pokeThread = null; downloadBuffer.limit(fullLength); downloadBuffer.position(0); } + catch (InterruptedIOException e) + { + // We were interrupted by the stop button. We're stopping now.. clear interruption flag. + Thread.interrupted(); + return; + } catch (IOException e) { - e.printStackTrace(); + throw new RuntimeException(e); } diff --git a/fml/conf/joined.exc b/fml/conf/joined.exc index e226a07261..9ff5593a9d 100644 --- a/fml/conf/joined.exc +++ b/fml/conf/joined.exc @@ -6061,19 +6061,15 @@ net/minecraft/src/WorldProvider.func_76563_a(JF)F=|p_76563_1_,p_76563_3_ net/minecraft/src/WorldProvider.func_76566_a(II)Z=|p_76566_1_,p_76566_2_ net/minecraft/src/WorldProvider.func_76568_b(II)Z=|p_76568_1_,p_76568_2_ net/minecraft/src/WorldProvider.func_76570_a(I)Lnet/minecraft/src/WorldProvider;=|p_76570_0_ -net/minecraft/src/WorldProvider.func_80004_l()Ljava/lang/String;=| net/minecraft/src/WorldProviderEnd.func_76560_a(FF)[F=|p_76560_1_,p_76560_2_ net/minecraft/src/WorldProviderEnd.func_76562_b(FF)Lnet/minecraft/src/Vec3;=|p_76562_1_,p_76562_2_ net/minecraft/src/WorldProviderEnd.func_76563_a(JF)F=|p_76563_1_,p_76563_3_ net/minecraft/src/WorldProviderEnd.func_76566_a(II)Z=|p_76566_1_,p_76566_2_ net/minecraft/src/WorldProviderEnd.func_76568_b(II)Z=|p_76568_1_,p_76568_2_ -net/minecraft/src/WorldProviderEnd.func_80004_l()Ljava/lang/String;=| net/minecraft/src/WorldProviderHell.func_76562_b(FF)Lnet/minecraft/src/Vec3;=|p_76562_1_,p_76562_2_ net/minecraft/src/WorldProviderHell.func_76563_a(JF)F=|p_76563_1_,p_76563_3_ net/minecraft/src/WorldProviderHell.func_76566_a(II)Z=|p_76566_1_,p_76566_2_ net/minecraft/src/WorldProviderHell.func_76568_b(II)Z=|p_76568_1_,p_76568_2_ -net/minecraft/src/WorldProviderHell.func_80004_l()Ljava/lang/String;=| -net/minecraft/src/WorldProviderSurface.func_80004_l()Ljava/lang/String;=| net/minecraft/src/WorldRenderer.(Lnet/minecraft/src/World;Ljava/util/List;IIII)V=|p_i3196_1_,p_i3196_2_,p_i3196_3_,p_i3196_4_,p_i3196_5_,p_i3196_6_ net/minecraft/src/WorldRenderer.func_78908_a(Lnet/minecraft/src/ICamera;)V=|p_78908_1_ net/minecraft/src/WorldRenderer.func_78909_a(I)I=|p_78909_1_ diff --git a/fml/conf/joined.srg b/fml/conf/joined.srg index 30559ae9ff..1d84ddcc92 100644 --- a/fml/conf/joined.srg +++ b/fml/conf/joined.srg @@ -4046,7 +4046,7 @@ FD: gr/M net/minecraft/src/WorldServer/field_73063_M FD: gr/N net/minecraft/src/WorldServer/field_73064_N FD: gr/O net/minecraft/src/WorldServer/field_73065_O FD: gr/P net/minecraft/src/WorldServer/field_73068_P -FD: gr/Q net/minecraft/src/WorldServer/field_80003_Q +FD: gr/Q net/minecraft/src/WorldServer/field_80004_Q FD: gr/R net/minecraft/src/WorldServer/field_73067_Q FD: gr/S net/minecraft/src/WorldServer/field_73070_R FD: gr/T net/minecraft/src/WorldServer/field_73069_S @@ -14146,7 +14146,7 @@ MD: xc/h ()Lj; net/minecraft/src/WorldProvider/func_76554_h ()Lnet/minecraft/src MD: xc/i ()I net/minecraft/src/WorldProvider/func_76557_i ()I MD: xc/j ()Z net/minecraft/src/WorldProvider/func_76564_j ()Z MD: xc/k ()D net/minecraft/src/WorldProvider/func_76565_k ()D -MD: xc/l ()Ljava/lang/String; net/minecraft/src/WorldProvider/func_80004_l ()Ljava/lang/String; +MD: xc/l ()Ljava/lang/String; net/minecraft/src/WorldProvider/func_80007_l ()Ljava/lang/String; MD: xd/a ()V net/minecraft/src/WorldProviderHell/func_76556_a ()V MD: xd/a (II)Z net/minecraft/src/WorldProviderHell/func_76566_a (II)Z MD: xd/a (JF)F net/minecraft/src/WorldProviderHell/func_76563_a (JF)F @@ -14156,8 +14156,8 @@ MD: xd/b (II)Z net/minecraft/src/WorldProviderHell/func_76568_b (II)Z MD: xd/c ()Lwi; net/minecraft/src/WorldProviderHell/func_76555_c ()Lnet/minecraft/src/IChunkProvider; MD: xd/d ()Z net/minecraft/src/WorldProviderHell/func_76569_d ()Z MD: xd/e ()Z net/minecraft/src/WorldProviderHell/func_76567_e ()Z -MD: xd/l ()Ljava/lang/String; net/minecraft/src/WorldProviderHell/func_80004_l ()Ljava/lang/String; -MD: xe/l ()Ljava/lang/String; net/minecraft/src/WorldProviderSurface/func_80004_l ()Ljava/lang/String; +MD: xd/l ()Ljava/lang/String; net/minecraft/src/WorldProviderHell/func_80007_l ()Ljava/lang/String; +MD: xe/l ()Ljava/lang/String; net/minecraft/src/WorldProviderSurface/func_80007_l ()Ljava/lang/String; MD: xf/a (FF)[F net/minecraft/src/WorldProviderEnd/func_76560_a (FF)[F MD: xf/a (II)Z net/minecraft/src/WorldProviderEnd/func_76566_a (II)Z MD: xf/a (JF)F net/minecraft/src/WorldProviderEnd/func_76563_a (JF)F @@ -14171,7 +14171,7 @@ MD: xf/f ()F net/minecraft/src/WorldProviderEnd/func_76571_f ()F MD: xf/g ()Z net/minecraft/src/WorldProviderEnd/func_76561_g ()Z MD: xf/h ()Lj; net/minecraft/src/WorldProviderEnd/func_76554_h ()Lnet/minecraft/src/ChunkCoordinates; MD: xf/i ()I net/minecraft/src/WorldProviderEnd/func_76557_i ()I -MD: xf/l ()Ljava/lang/String; net/minecraft/src/WorldProviderEnd/func_80004_l ()Ljava/lang/String; +MD: xf/l ()Ljava/lang/String; net/minecraft/src/WorldProviderEnd/func_80007_l ()Ljava/lang/String; MD: xg/a (JII[BDDDFFFIID)V net/minecraft/src/MapGenRavine/func_75045_a (JII[BDDDFFFIID)V MD: xg/a (Lup;IIII[B)V net/minecraft/src/MapGenRavine/func_75037_a (Lnet/minecraft/src/World;IIII[B)V MD: xi/a (II)Z net/minecraft/src/ChunkProviderFlat/func_73149_a (II)Z diff --git a/fml/conf/patches/minecraft_ff.patch b/fml/conf/patches/minecraft_ff.patch index f86fb3684e..cd6f03e4b3 100644 --- a/fml/conf/patches/minecraft_ff.patch +++ b/fml/conf/patches/minecraft_ff.patch @@ -146,29 +146,6 @@ diff -r -U 3 minecraft\net\minecraft\src\ItemMap.java minecraft_patched\net\mine MapData var4 = (MapData)p_77873_2_.func_72943_a(MapData.class, "map_" + p_77873_1_.func_77960_j()); if(var4 == null) { p_77873_1_.func_77964_b(p_77873_2_.func_72841_b("map")); -diff -r -U 3 minecraft\net\minecraft\src\RConThreadClient.java minecraft_patched\net\minecraft\src\RConThreadClient.java ---- minecraft\net\minecraft\src\RConThreadClient.java Tue Aug 14 20:15:27 2012 -+++ minecraft_patched\net\minecraft\src\RConThreadClient.java Tue Aug 14 20:18:48 2012 -@@ -40,13 +40,13 @@ - - BufferedInputStream var1 = new BufferedInputStream(this.field_72659_h.getInputStream()); - int var2 = var1.read(this.field_72660_i, 0, 1460); -- if(10 <= var2) { -- byte var3 = 0; -- int var4 = RConUtils.func_72665_b(this.field_72660_i, 0, var2); -- if(var4 != var2 - 4) { -- return; -- } -+ if(10 > var2) { -+ return; -+ } - -+ byte var3 = 0; -+ int var4 = RConUtils.func_72665_b(this.field_72660_i, 0, var2); -+ if(var4 == var2 - 4) { - int var21 = var3 + 4; - int var5 = RConUtils.func_72665_b(this.field_72660_i, var21, var2); - var21 += 4; diff -r -U 3 minecraft\net\minecraft\src\RenderGlobal.java minecraft_patched\net\minecraft\src\RenderGlobal.java --- minecraft\net\minecraft\src\RenderGlobal.java Tue Aug 14 20:15:27 2012 +++ minecraft_patched\net\minecraft\src\RenderGlobal.java Tue Aug 14 20:18:48 2012 diff --git a/fml/eclipse/.metadata/.plugins/org.eclipse.debug.core/.launches/FML-Server.launch b/fml/eclipse/.metadata/.plugins/org.eclipse.debug.core/.launches/FML-Server.launch index 2633aa3e41..9667c42820 100644 --- a/fml/eclipse/.metadata/.plugins/org.eclipse.debug.core/.launches/FML-Server.launch +++ b/fml/eclipse/.metadata/.plugins/org.eclipse.debug.core/.launches/FML-Server.launch @@ -1,26 +1,12 @@ - + - - - - - - - - - - - - - - - - + +