diff --git a/applychanges.py b/applychanges.py index d982275c..ff24c949 100644 --- a/applychanges.py +++ b/applychanges.py @@ -53,32 +53,35 @@ def merge_tree(root_src_dir, root_dst_dir): shutil.copy(src_file, dst_dir) -def applychanges(mcp_dir): +def applychanges(mcp_dir, patch_dir = "patches", backup = True, copyOriginal=True, mergeInNew=True ): print("Applying Changes...") mod_src_dir = os.path.join(mcp_dir, "src","minecraft") mod_bak_dir = os.path.join(mcp_dir, "src","minecraft-bak") org_src_dir = os.path.join(mcp_dir, "src",".minecraft_orig") - if os.path.exists(mod_src_dir): + if backup and os.path.exists(mod_src_dir): print("Backing up src/minecraft to src/minecraft-bak") shutil.rmtree( mod_bak_dir, True ) shutil.move( mod_src_dir, mod_bak_dir ) - shutil.copytree( org_src_dir, mod_src_dir, ignore=lambda p,f: [".git"] ) + if copyOriginal: + shutil.copytree( org_src_dir, mod_src_dir, ignore=lambda p,f: [".git"] ) #apply patches - apply_patches( mcp_dir, os.path.join( base_dir, "patches"), mod_src_dir ) + apply_patches( mcp_dir, os.path.join( base_dir, patch_dir ), mod_src_dir ) #merge in the new classes - merge_tree( os.path.join( base_dir, "src" ), mod_src_dir ) + if mergeInNew: + merge_tree( os.path.join( base_dir, "src" ), mod_src_dir ) if __name__ == '__main__': parser = OptionParser() parser.add_option('-m', '--mcp-dir', action='store', dest='mcp_dir', help='Path to MCP to use', default=None) + parser.add_option('-p', '--patch-dir', action='store', dest='patch_dir', help='Path to base patch dir', default='patches') options, _ = parser.parse_args() if not options.mcp_dir is None: - applychanges(os.path.abspath(options.mcp_dir)) + applychanges(os.path.abspath(options.mcp_dir), options.patch_dir) elif os.path.isfile(os.path.join('..', 'runtime', 'commands.py')): - applychanges(os.path.abspath('..')) + applychanges(os.path.abspath('..'), options.patch_dir) else: - applychanges(os.path.abspath(mcp_version)) + applychanges(os.path.abspath(mcp_version), options.patch_dir) diff --git a/build.py b/build.py index 26bf2926..da3e2917 100644 --- a/build.py +++ b/build.py @@ -5,7 +5,7 @@ from tempfile import mkstemp from shutil import move from os import remove, close -from install import download_deps, download_native, download_file, mkdir_p +from install import download_deps, download_native, download_file, mkdir_p, replacelineinfile from minecriftversion import mc_version, of_file_name, of_json_name, minecrift_version_num, minecrift_build, of_file_extension, of_file_md5, mcp_version, forge_version try: @@ -137,25 +137,6 @@ def create_install(mcp_dir): cwd=os.path.join(base_dir,"installer","launch4j"), bufsize=-1).communicate() os.unlink( "launch4j.xml" ) - -def replacelineinfile(file_path, pattern, subst): - #Create temp file - fh, abs_path = mkstemp() - new_file = open(abs_path,'w') - old_file = open(file_path) - for line in old_file: - if pattern in line: - new_file.write(subst) - else: - new_file.write(line) - #close temp file - new_file.close() - close(fh) - old_file.close() - #Remove original file - remove(file_path) - #Move new file - move(abs_path, file_path) def main(mcp_dir): print 'Using mcp dir: %s' % mcp_dir diff --git a/getchanges.bat b/getchanges.bat index 16f33c4b..87bb80c1 100644 --- a/getchanges.bat +++ b/getchanges.bat @@ -1,3 +1,2 @@ -echo Building patches... @echo off -python getchanges.py +python getchanges.py %* diff --git a/getchanges.py b/getchanges.py index 38e54c1c..072a3366 100644 --- a/getchanges.py +++ b/getchanges.py @@ -27,12 +27,12 @@ def create_patch( target_dir, src_file, mod_file, label, patch_file ): process = subprocess.Popen(cmd, cwd=target_dir, bufsize=-1, stdout=subprocess.PIPE) stdout, stderr = process.communicate() if stdout: - with open( patch_file, 'w') as out: - out.write( stdout ) + with open( patch_file, 'wb') as out: + out.write( stdout.replace('\r\n','\n').replace('\r','\n') ) -def main(mcp_dir): +def main(mcp_dir, patch_dir = "patches"): new_src_dir = os.path.join( base_dir , "src" ) - patch_base_dir = os.path.join( base_dir , "patches" ) + patch_base_dir = os.path.join( base_dir , patch_dir ) try: shutil.rmtree( new_src_dir ) @@ -81,16 +81,37 @@ def main(mcp_dir): if os.path.exists( new_file ): os.remove( new_file ) shutil.copy(mod_file, new_dir) + + removeEmptyFolders(patch_base_dir) + removeEmptyFolders(new_src_dir) + +def removeEmptyFolders(path): + if not os.path.isdir(path): + return + + # remove empty subfolders + files = os.listdir(path) + if len(files): + for f in files: + fullpath = os.path.join(path, f) + if os.path.isdir(fullpath): + removeEmptyFolders(fullpath) + + # if folder empty, delete it + files = os.listdir(path) + if len(files) == 0: + os.rmdir(path) if __name__ == '__main__': parser = OptionParser() parser.add_option('-m', '--mcp-dir', action='store', dest='mcp_dir', help='Path to MCP to use', default=None) + parser.add_option('-p', '--patch-dir', action='store', dest='patch_dir', help='Patch dir base name to use', default='patches') options, _ = parser.parse_args() if not options.mcp_dir is None: - main(os.path.abspath(options.mcp_dir)) + main(os.path.abspath(options.mcp_dir), options.patchdir) elif os.path.isfile(os.path.join('..', 'runtime', 'commands.py')): - main(os.path.abspath('..')) + main(os.path.abspath('..'), options.patchdir) else: - main(os.path.abspath(mcp_version)) + main(os.path.abspath(mcp_version), options.patch_dir) diff --git a/getcompilechanges.bat b/getcompilechanges.bat new file mode 100644 index 00000000..ca3409a0 --- /dev/null +++ b/getcompilechanges.bat @@ -0,0 +1,2 @@ +@echo off +python getchanges.py -p "mcppatches/patches" diff --git a/getcompilechanges.sh b/getcompilechanges.sh new file mode 100644 index 00000000..40c6a062 --- /dev/null +++ b/getcompilechanges.sh @@ -0,0 +1,2 @@ +#!/bin/bash +python getchanges.py -p "mcppatches/patches" diff --git a/install.py b/install.py index 2151699d..91b5bdf5 100644 --- a/install.py +++ b/install.py @@ -4,6 +4,11 @@ import shutil, tempfile, json import errno import platform +import shutil +import time +from shutil import move +from tempfile import mkstemp +from os import remove, close from minecriftversion import mc_version, of_file_name, of_json_name, minecrift_version_num, minecrift_build, of_file_extension, of_file_md5, mcp_version, mc_file_md5 from hashlib import md5 # pylint: disable-msg=E0611 from optparse import OptionParser @@ -14,6 +19,9 @@ preferredarch = '' nomerge = False +nopatch = False +clean = False +force = False try: WindowsError @@ -96,7 +104,7 @@ def is_non_zero_file(fpath): def download_deps( mcp_dir, download_mc ): mcp_exists = True - if not os.path.exists(mcp_dir+"/runtime/commands.py "): + if not os.path.exists(mcp_dir+"/runtime/commands.py"): mcp_exists = False try: mcp_zip_file = os.path.join( base_dir,mcp_version+".zip" ) @@ -116,15 +124,39 @@ def download_deps( mcp_dir, download_mc ): print "No %s directory or zip file found. Please copy the %s.zip file into %s and re-run the command." % (mcp_dir, mcp_dir, base_dir) exit(1) + # Patch mcp.cfg for additional mem print("Patching mcp.cfg. Ignore \"FAILED\" hunks") apply_patch( mcp_dir, os.path.join("mcppatches", "mcp.cfg.patch"), os.path.join(mcp_dir,"conf")) - client_md5 = os.path.join("mcppatches","client.md5") - target_client_md5 = os.path.join(mcp_dir,"temp","client.md5") - if not os.path.exists(target_client_md5): - mkdir_p( os.path.join(mcp_dir,"temp") ) - print 'Updating client.md5: copying %s to %s' % (client_md5, target_client_md5) - shutil.copy(client_md5,target_client_md5) + # Patch mcp.cfg with minecraft jar md5 + mcp_cfg_file = os.path.join(mcp_dir,"conf","mcp.cfg") + replacelineinfile( mcp_cfg_file, "MD5Client =", "MD5Client = %s\n" % mc_file_md5, True ); # Multiple 'MD5Client' entries - hack to get first one currently + #replacelineinfile( mcp_cfg_file, "MD5Server =", "MD5Server = %s\n" % mc_server_file_md5, True ); + + # patch joined.srg if necessary + mcp_joined_srg = os.path.join(mcp_dir,"conf","joined.srg") + patch_joined_srg = os.path.join(base_dir,"mcppatches","joined.srg") + if os.path.exists(patch_joined_srg): + print 'Updating joined.srg: copying %s to %s' % (patch_joined_srg, mcp_joined_srg) + shutil.copy(patch_joined_srg,mcp_joined_srg) + + # Patch fffix.py + fffix_patch_path = os.path.join(base_dir, "mcppatches", "fffix.py.patch") + if os.path.exists(fffix_patch_path): + print("Patching fffix.py. Ignore \"FAILED\" hunks") + apply_patch( mcp_dir, os.path.join("mcppatches", "fffix.py.patch"), os.path.join(mcp_dir,"runtime","pylibs")) + + # Patch Start.java with minecraft version + start_java_file = os.path.join(base_dir,"mcppatches","Start.java") + target_start_java_file = os.path.join(mcp_dir,"conf","patches","Start.java") + print 'Updating Start.java: copying %s to %s' % (start_java_file, target_start_java_file) + shutil.copy(start_java_file,target_start_java_file) + replacelineinfile( target_start_java_file, "args = concat(new String[] {\"--version\", \"mcp\"", " args = concat(new String[] {\"--version\", \"mcp\", \"--accessToken\", \"0\", \"--assetsDir\", \"assets\", \"--assetIndex\", \"%s\", \"--userProperties\", \"{}\"}, args);\n" % mc_version ); + + # Setup the appropriate mcp file versions + mcp_version_cfg = os.path.join(mcp_dir,"conf","version.cfg") + replacelineinfile( mcp_version_cfg, "ClientVersion =", "ClientVersion = %s\n" % mc_version ); + replacelineinfile( mcp_version_cfg, "ServerVersion =", "ServerVersion = %s\n" % mc_version ); jars = os.path.join(mcp_dir,"jars") @@ -348,6 +380,28 @@ def main(mcp_dir): print 'Preferred architecture: %sbit - preferring %sbit native extraction (use -a 32 or -a 64 to change)' % (preferredarch, preferredarch) if nomerge is True: print 'NO Optifine merging' + if nopatch is True: + print 'SKIPPING Apply patches' + + if clean == True: + print 'Cleaning...' + if force == False: + print '' + print 'WARNING:' + print 'The clean option will delete all folders created by MCP, including the' + print 'src folder which may contain changes you made to the code, along with any' + print 'saved worlds from the client or server.' + print 'Minecrift downloaded dependencies will also be removed and re-downloaded.' + print 'Patches will be left alone however.' + answer = raw_input('If you really want to clean up, enter "Yes" ') + if answer.lower() not in ['yes']: + print 'You have not entered "Yes", aborting the clean up process' + sys.exit(1) + print 'Cleaning mcp dir...' + reallyrmtree(mcp_dir) + print 'Cleaning lib dir...' + reallyrmtree(os.path.join(base_dir,'lib')) + print("\nDownloading dependencies...") download_deps( mcp_dir, True ) @@ -358,7 +412,7 @@ def main(mcp_dir): print ' Merging\n %s\n into\n %s' % (optifine, minecraft_jar) zipmerge( minecraft_jar, optifine ) else: - print("Skipping Optifine merge...") + print("Skipping Optifine merge!") print("Decompiling...") src_dir = os.path.join(mcp_dir, "src","minecraft") @@ -372,17 +426,111 @@ def main(mcp_dir): os.chdir( base_dir ) + # Create original decompile src dir org_src_dir = os.path.join(mcp_dir, "src",".minecraft_orig") if os.path.exists( org_src_dir ): shutil.rmtree( org_src_dir, True ) shutil.copytree( src_dir, org_src_dir ) - applychanges( mcp_dir ) + if nopatch == False: + compile_error_patching_done = False + + # Patch stage 1: apply only the patches needed to correct the + # optifine merge decompile errors + mcp_patch_dir = os.path.join( base_dir, "mcppatches", "patches" ) + if os.path.exists( mcp_patch_dir ): + print("Patching Optifine merge decompile errors...") + applychanges( mcp_dir, patch_dir="mcppatches/patches", backup=False, copyOriginal=False, mergeInNew=False ) + compile_error_patching_done = True + + # Address problem files - copy over directly + problem_file_dir = os.path.join( base_dir, "mcppatches", "problemfiles" ) + if os.path.exists( problem_file_dir ): + print("Addressing problem files...") + xp_problem_file = os.path.join(problem_file_dir, "xp.java") + shutil.copy( xp_problem_file, os.path.join( mcp_dir, "src", "minecraft", "net", "minecraft", "src", "xp.java" ) ) + chunkrenderdispatcher_problem_file = os.path.join(problem_file_dir, "ChunkRenderDispatcher.java") + shutil.copy( chunkrenderdispatcher_problem_file, os.path.join( mcp_dir, "src", "minecraft", "net", "minecraft", "client", "renderer", "chunk", "ChunkRenderDispatcher.java" ) ) + compile_error_patching_done = True + + # Update the client md5 + if compile_error_patching_done == True: + print("Updating client.md5...") + os.chdir(mcp_dir) + from runtime.updatemd5 import updatemd5 + updatemd5( None, True, True, False ) + os.chdir( base_dir ) + + # Now re-create the .minecraft_orig with the new buildable state + if os.path.exists( org_src_dir ): + shutil.rmtree( org_src_dir, True ) + shutil.copytree( src_dir, org_src_dir ) + + # Patch stage 2: Now apply our main Minecrift patches, only + # changes needed for Minecrift functionality + print("Applying full Minecrift patches...") + applychanges( mcp_dir ) + else: + print("Apply patches skipped!") + +def reallyrmtree(path): + if not sys.platform.startswith('win'): + if os.path.exists(path): + shutil.rmtree(path) + else: + i = 0 + try: + while os.stat(path) and i < 20: + shutil.rmtree(path, onerror=rmtree_onerror) + i += 1 + except OSError: + pass + + # raise OSError if the path still exists even after trying really hard + try: + os.stat(path) + except OSError: + pass + else: + raise OSError(errno.EPERM, "Failed to remove: '" + path + "'", path) +def rmtree_onerror(func, path, _): + if not os.access(path, os.W_OK): + os.chmod(path, stat.S_IWUSR) + time.sleep(0.5) + try: + func(path) + except OSError: + pass + +def replacelineinfile(file_path, pattern, subst, firstmatchonly=False): + #Create temp file + fh, abs_path = mkstemp() + new_file = open(abs_path,'wb') + old_file = open(file_path,'rb') + hit = False + for line in old_file: + if pattern in line and not (firstmatchonly == True and hit == True): + new_file.write(subst) + hit = True + else: + new_file.write(line) + #close temp file + new_file.close() + close(fh) + old_file.close() + #Remove original file + remove(file_path) + #Move new file + move(abs_path, file_path) + if __name__ == '__main__': parser = OptionParser() parser.add_option('-o', '--no-optifine', dest='nomerge', default=False, action='store_true', help='If specified, no optifine merge will be carried out') + parser.add_option('-c', '--clean', dest='clean', default=False, action='store_true', help='Cleans the mcp dir, and REMOVES ALL SOURCE IN THE MCPxxx/SRC dir. Re-downloads dependencies') + parser.add_option('-f', '--force', dest='force', default=False, action='store_true', help='Forces any changes without prompts') + parser.add_option('-n', '--no-patch', dest='nopatch', default=False, action='store_true', help='If specified, no patches will be applied at the end of installation') parser.add_option('-m', '--mcp-dir', action='store', dest='mcp_dir', help='Path to MCP to use', default=None) parser.add_option('-a', '--architecture', action='store', dest='arch', help='Architecture to use (\'32\' or \'64\'); prefer 32 or 64bit dlls', default=None) options, _ = parser.parse_args() @@ -395,8 +543,12 @@ def main(mcp_dir): if preferredarch is '': preferredarch = osArch() + nomerge = options.nomerge + nopatch = options.nopatch + clean = options.clean + force = options.force if not options.mcp_dir is None: main(os.path.abspath(options.mcp_dir)) diff --git a/mcp908/conf/patches/Start.java b/mcp908/conf/patches/Start.java deleted file mode 100644 index 207aff56..00000000 --- a/mcp908/conf/patches/Start.java +++ /dev/null @@ -1,95 +0,0 @@ -import java.util.ArrayList; -import java.util.Arrays; - -import com.mtbs3d.minecrift.utils.SessionID; -import joptsimple.ArgumentAcceptingOptionSpec; -import joptsimple.OptionParser; -import joptsimple.OptionSet; -import net.minecraft.client.main.Main; -import net.minecraft.util.Session; - -public class Start -{ - public static void main(String[] args) throws Exception - { - // Support --username and --password parameters as args. - args = concat(new String[] {"--version", "mcp", "--accessToken", "0", "--assetsDir", "assets", "--assetIndex", "1.7.10", "--userProperties", "{}"}, args); - - // Authenticate --username and --password with Mojang. - // *** Username should most likely be an email address!!! *** - OptionParser optionParser = new OptionParser(); - optionParser.allowsUnrecognizedOptions(); - ArgumentAcceptingOptionSpec username = optionParser.accepts("username").withRequiredArg(); - ArgumentAcceptingOptionSpec password = optionParser.accepts("password").withRequiredArg(); - OptionSet optionSet = optionParser.parse(args); - String user = (String)optionSet.valueOf(username); - String pass = (String)optionSet.valueOf(password); - if (user != null && pass != null) - { - Session session = null; - - try { - session = SessionID.GetSSID(user, pass); - if (session == null) - throw new Exception("Bad login!"); - } - catch (Exception ex) - { - ex.printStackTrace(); - Main.main(args); - } - - ArrayList newArgs = new ArrayList(); - - // Remove old username & session, password fields etc. - for(int i = 0; i < args.length; i++) - { - if (args[i].compareToIgnoreCase("--username") == 0 || - args[i].compareToIgnoreCase("--password") == 0 || - args[i].compareToIgnoreCase("--session") == 0 || - args[i].compareToIgnoreCase("--uuid") == 0 || - args[i].compareToIgnoreCase("--accessToken") == 0) - { - // Skip next index as well... - i++; - } - else - { - // Add to new arg list - newArgs.add(args[i]); - } - } - - newArgs.add("--username"); - newArgs.add(session.getUsername()); - newArgs.add("--uuid"); - newArgs.add(session.getPlayerID()); - newArgs.add("--accessToken"); - newArgs.add(session.getToken()); - - //dumpArgs(newArgs.toArray(new String[0])); - Main.main(newArgs.toArray(new String[0])); - } - else - { - //dumpArgs(args); - Main.main(args); - } - } - - private static void dumpArgs(String[] newArgs) - { - StringBuilder sb = new StringBuilder(); - for (String s : newArgs) { - sb.append(s).append(" "); - } - System.out.println("[Minecrift] Calling Main.main with args: " + sb.toString()); - } - - public static T[] concat(T[] first, T[] second) - { - T[] result = Arrays.copyOf(first, first.length + second.length); - System.arraycopy(second, 0, result, first.length, second.length); - return result; - } -} diff --git a/mcppatches/Start.java b/mcppatches/Start.java new file mode 100644 index 00000000..01de88b3 --- /dev/null +++ b/mcppatches/Start.java @@ -0,0 +1,186 @@ +import java.io.BufferedReader; +import java.io.DataOutputStream; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.net.HttpURLConnection; +import java.net.URL; +import java.util.ArrayList; +import java.util.Arrays; + +import joptsimple.ArgumentAcceptingOptionSpec; +import joptsimple.OptionParser; +import joptsimple.OptionSet; +import net.minecraft.client.main.Main; +import net.minecraft.util.Session; +import org.json.JSONObject; // JAR available at http://mvnrepository.com/artifact/org.json/json/20140107 + +public class Start +{ + public static void main(String[] args) throws Exception + { + // Support --username and --password parameters as args. + /** LEAVE THE LINE BELOW - IT'S UPDATED BY THE INSTALL SCRIPTS TO THE CORRECT MINECRAFT VERSION */ + args = concat(new String[] {"--version", "mcp", "--accessToken", "0", "--assetsDir", "assets", "--assetIndex", "1.8", "--userProperties", "{}"}, args); + + // Authenticate --username and --password with Mojang. + // *** Username should most likely be an email address!!! *** + OptionParser optionParser = new OptionParser(); + optionParser.allowsUnrecognizedOptions(); + ArgumentAcceptingOptionSpec username = optionParser.accepts("username").withRequiredArg(); + ArgumentAcceptingOptionSpec password = optionParser.accepts("password").withRequiredArg(); + OptionSet optionSet = optionParser.parse(args); + String user = (String)optionSet.valueOf(username); + String pass = (String)optionSet.valueOf(password); + + if (user != null && pass != null) + { + Session session = null; + + try + { + session = Start.GetSSID(user, pass); + + if (session == null) + { + throw new Exception("Bad login!"); + } + } + catch (Exception ex) + { + ex.printStackTrace(); + Main.main(args); + } + + ArrayList newArgs = new ArrayList(); + + for (int i = 0; i < args.length; i++) + { + if (args[i].compareToIgnoreCase("--username") == 0 || + args[i].compareToIgnoreCase("--password") == 0 || + args[i].compareToIgnoreCase("--session") == 0 || + args[i].compareToIgnoreCase("--uuid") == 0 || + args[i].compareToIgnoreCase("--accessToken") == 0) + { + i++; + } + else + { + newArgs.add(args[i]); + } + } + + newArgs.add("--username"); + newArgs.add(session.getUsername()); + newArgs.add("--uuid"); + newArgs.add(session.getPlayerID()); + newArgs.add("--accessToken"); + newArgs.add(session.getToken()); + Main.main(newArgs.toArray(new String[0])); + } + else + { + Main.main(args); + } + } + + private static void dumpArgs(String[] newArgs) + { + StringBuilder sb = new StringBuilder(); + + for (String s : newArgs) + { + sb.append(s).append(" "); + } + + System.out.println("[Minecrift] Calling Main.main with args: " + sb.toString()); + } + + public static T[] concat(T[] first, T[] second) + { + T[] result = Arrays.copyOf(first, first.length + second.length); + System.arraycopy(second, 0, result, first.length, second.length); + return result; + } + + public static final Session GetSSID(String username, String password) + { + byte[] b = null; + String jsonEncoded = + "{\"agent\":{\"name\":\"Minecraft\",\"version\":1},\"username\":\"" + + username + + "\",\"password\":\"" + + password + "\"}"; + String response = executePost("https://authserver.mojang.com/authenticate", jsonEncoded); + if (response == null || response.isEmpty()) + return null; + + // **** JSON parsing courtesy of ssewell **** + // Create a parsable JSON object from our response string + JSONObject jsonRepsonse = new JSONObject(response); + + // Obtain our current profile (which contains the user ID and name + JSONObject jsonSelectedProfile = jsonRepsonse.getJSONObject("selectedProfile"); + + // Session ID = "token::" + // Username will probably *not be an email address + String accessToken = jsonRepsonse.getString("accessToken"); + String id = jsonSelectedProfile.getString("id"); + String sessionID = "token:" + jsonRepsonse.getString("accessToken") + ":" + jsonSelectedProfile.getString("id"); + String userName = jsonSelectedProfile.getString("name"); + + Session session = new Session(userName, id, accessToken, "legacy"); + return session; + } + + public static String executePost(String targetURL, String urlParameters) + { + URL url; + HttpURLConnection connection = null; + try { + //Create connection + url = new URL(targetURL); + connection = (HttpURLConnection)url.openConnection(); + connection.setRequestMethod("POST"); + connection.setRequestProperty("Content-Type", + "application/json"); + + connection.setRequestProperty("Content-Length", "" + + Integer.toString(urlParameters.getBytes().length)); + connection.setRequestProperty("Content-Language", "en-US"); + + connection.setUseCaches (false); + connection.setDoInput(true); + connection.setDoOutput(true); + + //Send request + DataOutputStream wr = new DataOutputStream ( + connection.getOutputStream ()); + wr.writeBytes (urlParameters); + wr.flush (); + wr.close (); + + //Get Response + InputStream is = connection.getInputStream(); + BufferedReader rd = new BufferedReader(new InputStreamReader(is)); + String line; + StringBuffer response = new StringBuffer(); + while((line = rd.readLine()) != null) { + response.append(line); + response.append('\r'); + } + rd.close(); + return response.toString(); + + } catch (Exception e) { + + e.printStackTrace(); + return null; + + } finally { + + if(connection != null) { + connection.disconnect(); + } + } + } +} diff --git a/mcppatches/patches/net/minecraft/client/entity/AbstractClientPlayer.java.patch b/mcppatches/patches/net/minecraft/client/entity/AbstractClientPlayer.java.patch new file mode 100644 index 00000000..08c95fd4 --- /dev/null +++ b/mcppatches/patches/net/minecraft/client/entity/AbstractClientPlayer.java.patch @@ -0,0 +1,18 @@ +--- a/net/minecraft/client/entity/AbstractClientPlayer.java ++++ b/net/minecraft/client/entity/AbstractClientPlayer.java +@@ -24,7 +24,6 @@ + private ResourceLocation locationSkin; + private ResourceLocation locationCape; + private static final String __OBFID = "CL_00000935"; +- private static final String __OBFID = "CL_00000935"; + + public AbstractClientPlayer(World p_i45074_1_, GameProfile p_i45074_2_) + { +@@ -118,7 +117,6 @@ + { + static final int[] field_152630_a = new int[Type.values().length]; + private static final String __OBFID = "CL_00001832"; +- private static final String __OBFID = "CL_00001832"; + + static + { diff --git a/mcppatches/patches/net/minecraft/client/gui/FontRenderer.java.patch b/mcppatches/patches/net/minecraft/client/gui/FontRenderer.java.patch new file mode 100644 index 00000000..df9a214c --- /dev/null +++ b/mcppatches/patches/net/minecraft/client/gui/FontRenderer.java.patch @@ -0,0 +1,10 @@ +--- a/net/minecraft/client/gui/FontRenderer.java ++++ b/net/minecraft/client/gui/FontRenderer.java +@@ -104,7 +104,6 @@ + public ResourceLocation locationFontTextureBase; + public boolean enabled = true; + public float scaleFactor = 1.0F; +- private static final String __OBFID = "CL_00000660"; + + public FontRenderer(GameSettings par1GameSettings, ResourceLocation par2ResourceLocation, TextureManager par3TextureManager, boolean par4) + { diff --git a/mcppatches/patches/net/minecraft/client/gui/GuiVideoSettings.java.patch b/mcppatches/patches/net/minecraft/client/gui/GuiVideoSettings.java.patch new file mode 100644 index 00000000..2e32a1e4 --- /dev/null +++ b/mcppatches/patches/net/minecraft/client/gui/GuiVideoSettings.java.patch @@ -0,0 +1,10 @@ +--- a/net/minecraft/client/gui/GuiVideoSettings.java ++++ b/net/minecraft/client/gui/GuiVideoSettings.java +@@ -19,7 +19,6 @@ + private int lastMouseX = 0; + private int lastMouseY = 0; + private long mouseStillTime = 0L; +- private static final String __OBFID = "CL_00000718"; + + public GuiVideoSettings(GuiScreen par1GuiScreen, GameSettings par2GameSettings) + { diff --git a/mcppatches/patches/net/minecraft/client/renderer/EntityRenderer.java.patch b/mcppatches/patches/net/minecraft/client/renderer/EntityRenderer.java.patch new file mode 100644 index 00000000..4a8bd8f3 --- /dev/null +++ b/mcppatches/patches/net/minecraft/client/renderer/EntityRenderer.java.patch @@ -0,0 +1,52 @@ +--- a/net/minecraft/client/renderer/EntityRenderer.java ++++ b/net/minecraft/client/renderer/EntityRenderer.java +@@ -238,7 +238,6 @@ + public long prevFrameTimeNano = -1L; + private boolean lastShowDebugInfo = false; + private boolean showExtendedDebugInfo = false; +- private static final String __OBFID = "CL_00000947"; + + public EntityRenderer(Minecraft p_i45076_1_, IResourceManager p_i45076_2_) + { +@@ -1342,41 +1341,26 @@ + var11.addCrashSectionCallable("Screen name", new Callable() + { + private static final String __OBFID = "CL_00000948"; +- private static final String __OBFID = "CL_00000948"; + public String call() + { + return EntityRenderer.this.mc.currentScreen.getClass().getCanonicalName(); + } +- public Object call() throws Exception +- { +- return this.call(); +- } + }); + var11.addCrashSectionCallable("Mouse location", new Callable() + { + private static final String __OBFID = "CL_00000950"; +- private static final String __OBFID = "CL_00000950"; + public String call() + { + return String.format("Scaled: (%d, %d). Absolute: (%d, %d)", new Object[] {Integer.valueOf(var161), Integer.valueOf(var171), Integer.valueOf(Mouse.getX()), Integer.valueOf(Mouse.getY())}); + } +- public Object call() throws Exception +- { +- return this.call(); +- } + }); + var11.addCrashSectionCallable("Screen size", new Callable() + { + private static final String __OBFID = "CL_00000951"; +- private static final String __OBFID = "CL_00000951"; + public String call() + { + return String.format("Scaled: (%d, %d). Absolute: (%d, %d). Scale factor of %d", new Object[] {Integer.valueOf(var133.getScaledWidth()), Integer.valueOf(var133.getScaledHeight()), Integer.valueOf(EntityRenderer.this.mc.displayWidth), Integer.valueOf(EntityRenderer.this.mc.displayHeight), Integer.valueOf(var133.getScaleFactor())}); + } +- public Object call() throws Exception +- { +- return this.call(); +- } + }); + throw new ReportedException(var10); + } diff --git a/mcppatches/patches/net/minecraft/client/renderer/ImageBufferDownload.java.patch b/mcppatches/patches/net/minecraft/client/renderer/ImageBufferDownload.java.patch new file mode 100644 index 00000000..a8494941 --- /dev/null +++ b/mcppatches/patches/net/minecraft/client/renderer/ImageBufferDownload.java.patch @@ -0,0 +1,10 @@ +--- a/net/minecraft/client/renderer/ImageBufferDownload.java ++++ b/net/minecraft/client/renderer/ImageBufferDownload.java +@@ -11,7 +11,6 @@ + private int imageWidth; + private int imageHeight; + private static final String __OBFID = "CL_00000956"; +- private static final String __OBFID = "CL_00000956"; + + public BufferedImage parseUserSkin(BufferedImage par1BufferedImage) + { diff --git a/mcppatches/patches/net/minecraft/client/renderer/OpenGlHelper.java.patch b/mcppatches/patches/net/minecraft/client/renderer/OpenGlHelper.java.patch new file mode 100644 index 00000000..2cc6bbfa --- /dev/null +++ b/mcppatches/patches/net/minecraft/client/renderer/OpenGlHelper.java.patch @@ -0,0 +1,10 @@ +--- a/net/minecraft/client/renderer/OpenGlHelper.java ++++ b/net/minecraft/client/renderer/OpenGlHelper.java +@@ -63,7 +63,6 @@ + private static final String __OBFID = "CL_00001179"; + public static float lastBrightnessX = 0.0F; + public static float lastBrightnessY = 0.0F; +- private static final String __OBFID = "CL_00001179"; + + /** + * Initializes the texture constants to be used when rendering lightmap values diff --git a/mcppatches/patches/net/minecraft/client/renderer/RenderBlocks.java.patch b/mcppatches/patches/net/minecraft/client/renderer/RenderBlocks.java.patch new file mode 100644 index 00000000..98a93f12 --- /dev/null +++ b/mcppatches/patches/net/minecraft/client/renderer/RenderBlocks.java.patch @@ -0,0 +1,10 @@ +--- a/net/minecraft/client/renderer/RenderBlocks.java ++++ b/net/minecraft/client/renderer/RenderBlocks.java +@@ -161,7 +161,6 @@ + public float aoLightValueOpaque = 0.2F; + public boolean betterSnowEnabled = true; + private static RenderBlocks instance; +- private static final String __OBFID = "CL_00000940"; + + public RenderBlocks(IBlockAccess par1IBlockAccess) + { diff --git a/mcppatches/patches/net/minecraft/client/renderer/RenderGlobal.java.patch b/mcppatches/patches/net/minecraft/client/renderer/RenderGlobal.java.patch new file mode 100644 index 00000000..6b161fca --- /dev/null +++ b/mcppatches/patches/net/minecraft/client/renderer/RenderGlobal.java.patch @@ -0,0 +1,73 @@ +--- a/net/minecraft/client/renderer/RenderGlobal.java ++++ b/net/minecraft/client/renderer/RenderGlobal.java +@@ -262,7 +262,6 @@ + private long lastMovedTime = System.currentTimeMillis(); + private long lastActionTime = System.currentTimeMillis(); + private static AxisAlignedBB AABB_INFINITE = AxisAlignedBB.getBoundingBox(Double.NEGATIVE_INFINITY, Double.NEGATIVE_INFINITY, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, Double.POSITIVE_INFINITY, Double.POSITIVE_INFINITY); +- private static final String __OBFID = "CL_00000954"; + + public RenderGlobal(Minecraft par1Minecraft) + { +@@ -1805,7 +1804,7 @@ + float var19 = this.theWorld.provider.getCloudHeight() - var21 + 0.33F; + var19 += this.mc.gameSettings.ofCloudsHeight * 128.0F; + float var20 = (float)(dc * (double)var10); +- float var21 = (float)(cdx * (double)var10); ++ float var21a = (float)(cdx * (double)var10); + var5.startDrawingQuads(); + var5.setColorRGBA_F(exactPlayerX, var8, exactPlayerY, 0.8F); + +@@ -1813,10 +1812,10 @@ + { + for (int var23 = -var3 * var4; var23 < var3 * var4; var23 += var3) + { +- var5.addVertexWithUV((double)(var22 + 0), (double)var19, (double)(var23 + var3), (double)((float)(var22 + 0) * var10 + var20), (double)((float)(var23 + var3) * var10 + var21)); +- var5.addVertexWithUV((double)(var22 + var3), (double)var19, (double)(var23 + var3), (double)((float)(var22 + var3) * var10 + var20), (double)((float)(var23 + var3) * var10 + var21)); +- var5.addVertexWithUV((double)(var22 + var3), (double)var19, (double)(var23 + 0), (double)((float)(var22 + var3) * var10 + var20), (double)((float)(var23 + 0) * var10 + var21)); +- var5.addVertexWithUV((double)(var22 + 0), (double)var19, (double)(var23 + 0), (double)((float)(var22 + 0) * var10 + var20), (double)((float)(var23 + 0) * var10 + var21)); ++ var5.addVertexWithUV((double)(var22 + 0), (double)var19, (double)(var23 + var3), (double)((float)(var22 + 0) * var10 + var20), (double)((float)(var23 + var3) * var10 + var21a)); ++ var5.addVertexWithUV((double)(var22 + var3), (double)var19, (double)(var23 + var3), (double)((float)(var22 + var3) * var10 + var20), (double)((float)(var23 + var3) * var10 + var21a)); ++ var5.addVertexWithUV((double)(var22 + var3), (double)var19, (double)(var23 + 0), (double)((float)(var22 + var3) * var10 + var20), (double)((float)(var23 + 0) * var10 + var21a)); ++ var5.addVertexWithUV((double)(var22 + 0), (double)var19, (double)(var23 + 0), (double)((float)(var22 + 0) * var10 + var20), (double)((float)(var23 + 0) * var10 + var21a)); + } + } + +@@ -2471,15 +2470,10 @@ + var16.addCrashSectionCallable("Position", new Callable() + { + private static final String __OBFID = "CL_00000955"; +- private static final String __OBFID = "CL_00000955"; + public String call() + { + return CrashReportCategory.func_85074_a(par2, par4, par6); + } +- public Object call() throws Exception +- { +- return this.call(); +- } + }); + throw new ReportedException(var15); + } +@@ -2508,19 +2502,19 @@ + { + if (Config.isAnimatedExplosion()) + { +- this.mc.effectRenderer.addEffect(var21 = new EntityHugeExplodeFX(this.theWorld, par2, par4, par6, par8, par10, par12)); ++ this.mc.effectRenderer.addEffect((EntityFX)(var21 = new EntityHugeExplodeFX(this.theWorld, par2, par4, par6, par8, par10, par12))); + } + } + else if (par1Str.equals("largeexplode")) + { + if (Config.isAnimatedExplosion()) + { +- this.mc.effectRenderer.addEffect(var21 = new EntityLargeExplodeFX(this.renderEngine, this.theWorld, par2, par4, par6, par8, par10, par12)); ++ this.mc.effectRenderer.addEffect((EntityFX)(var21 = new EntityLargeExplodeFX(this.renderEngine, this.theWorld, par2, par4, par6, par8, par10, par12))); + } + } + else if (par1Str.equals("fireworksSpark")) + { +- this.mc.effectRenderer.addEffect(var21 = new EntityFireworkSparkFX(this.theWorld, par2, par4, par6, par8, par10, par12, this.mc.effectRenderer)); ++ this.mc.effectRenderer.addEffect((EntityFX)(var21 = new EntityFireworkSparkFX(this.theWorld, par2, par4, par6, par8, par10, par12, this.mc.effectRenderer))); + } + + if (var21 != null) diff --git a/mcppatches/patches/net/minecraft/client/renderer/Tessellator.java.patch b/mcppatches/patches/net/minecraft/client/renderer/Tessellator.java.patch new file mode 100644 index 00000000..0b977aa0 --- /dev/null +++ b/mcppatches/patches/net/minecraft/client/renderer/Tessellator.java.patch @@ -0,0 +1,10 @@ +--- a/net/minecraft/client/renderer/Tessellator.java ++++ b/net/minecraft/client/renderer/Tessellator.java +@@ -112,7 +112,6 @@ + private VertexData[] vertexDatas; + private boolean[] drawnIcons; + private TextureAtlasSprite[] vertexQuadIcons; +- private static final String __OBFID = "CL_00000960"; + + public Tessellator() + { diff --git a/mcppatches/patches/net/minecraft/client/renderer/WorldRenderer.java.patch b/mcppatches/patches/net/minecraft/client/renderer/WorldRenderer.java.patch new file mode 100644 index 00000000..4b76510b --- /dev/null +++ b/mcppatches/patches/net/minecraft/client/renderer/WorldRenderer.java.patch @@ -0,0 +1,10 @@ +--- a/net/minecraft/client/renderer/WorldRenderer.java ++++ b/net/minecraft/client/renderer/WorldRenderer.java +@@ -107,7 +107,6 @@ + public RenderGlobal renderGlobal; + public static int globalChunkOffsetX = 0; + public static int globalChunkOffsetZ = 0; +- private static final String __OBFID = "CL_00000942"; + + public WorldRenderer(World par1World, List par2List, int par3, int par4, int par5, int par6) + { diff --git a/mcppatches/patches/net/minecraft/client/renderer/culling/ClippingHelper.java.patch b/mcppatches/patches/net/minecraft/client/renderer/culling/ClippingHelper.java.patch new file mode 100644 index 00000000..578280a2 --- /dev/null +++ b/mcppatches/patches/net/minecraft/client/renderer/culling/ClippingHelper.java.patch @@ -0,0 +1,10 @@ +--- a/net/minecraft/client/renderer/culling/ClippingHelper.java ++++ b/net/minecraft/client/renderer/culling/ClippingHelper.java +@@ -7,7 +7,6 @@ + public float[] modelviewMatrix = new float[16]; + public float[] clippingMatrix = new float[16]; + private static final String __OBFID = "CL_00000977"; +- private static final String __OBFID = "CL_00000977"; + + /** + * Returns true if the box is inside all 6 clipping planes, otherwise returns false. diff --git a/mcppatches/patches/net/minecraft/client/renderer/culling/Frustrum.java.patch b/mcppatches/patches/net/minecraft/client/renderer/culling/Frustrum.java.patch new file mode 100644 index 00000000..5f3ef233 --- /dev/null +++ b/mcppatches/patches/net/minecraft/client/renderer/culling/Frustrum.java.patch @@ -0,0 +1,10 @@ +--- a/net/minecraft/client/renderer/culling/Frustrum.java ++++ b/net/minecraft/client/renderer/culling/Frustrum.java +@@ -9,7 +9,6 @@ + private double yPosition; + private double zPosition; + private static final String __OBFID = "CL_00000976"; +- private static final String __OBFID = "CL_00000976"; + + public void setPosition(double par1, double par3, double par5) + { diff --git a/mcppatches/patches/net/minecraft/client/renderer/texture/TextureAtlasSprite.java.patch b/mcppatches/patches/net/minecraft/client/renderer/texture/TextureAtlasSprite.java.patch new file mode 100644 index 00000000..4d8c0763 --- /dev/null +++ b/mcppatches/patches/net/minecraft/client/renderer/texture/TextureAtlasSprite.java.patch @@ -0,0 +1,29 @@ +--- a/net/minecraft/client/renderer/texture/TextureAtlasSprite.java ++++ b/net/minecraft/client/renderer/texture/TextureAtlasSprite.java +@@ -47,7 +47,6 @@ + private int uploadedOwnFrameIndex = -1; + public IntBuffer[] frameBuffers; + public Mipmaps[] frameMipmaps; +- private static final String __OBFID = "CL_00001062"; + + protected TextureAtlasSprite(String par1Str) + { +@@ -330,7 +329,6 @@ + var7.addCrashSectionCallable("Frame sizes", new Callable() + { + private static final String __OBFID = "CL_00001063"; +- private static final String __OBFID = "CL_00001063"; + public String call() + { + StringBuilder var1 = new StringBuilder(); +@@ -351,10 +349,6 @@ + + return var1.toString(); + } +- public Object call() throws Exception +- { +- return this.call(); +- } + }); + throw new ReportedException(var6); + } diff --git a/mcppatches/patches/net/minecraft/client/renderer/texture/TextureManager.java.patch b/mcppatches/patches/net/minecraft/client/renderer/texture/TextureManager.java.patch new file mode 100644 index 00000000..c3d1bebf --- /dev/null +++ b/mcppatches/patches/net/minecraft/client/renderer/texture/TextureManager.java.patch @@ -0,0 +1,26 @@ +--- a/net/minecraft/client/renderer/texture/TextureManager.java ++++ b/net/minecraft/client/renderer/texture/TextureManager.java +@@ -29,7 +29,6 @@ + private final Map mapTextureCounters = Maps.newHashMap(); + private IResourceManager theResourceManager; + private static final String __OBFID = "CL_00001064"; +- private static final String __OBFID = "CL_00001064"; + + public TextureManager(IResourceManager par1ResourceManager) + { +@@ -109,15 +108,10 @@ + var6.addCrashSectionCallable("Texture object class", new Callable() + { + private static final String __OBFID = "CL_00001065"; +- private static final String __OBFID = "CL_00001065"; + public String call() + { + return par2TextureObject.getClass().getName(); + } +- public Object call() throws Exception +- { +- return this.call(); +- } + }); + throw new ReportedException(var5); + } diff --git a/mcppatches/patches/net/minecraft/client/renderer/texture/TextureMap.java.patch b/mcppatches/patches/net/minecraft/client/renderer/texture/TextureMap.java.patch new file mode 100644 index 00000000..47064f93 --- /dev/null +++ b/mcppatches/patches/net/minecraft/client/renderer/texture/TextureMap.java.patch @@ -0,0 +1,52 @@ +--- a/net/minecraft/client/renderer/texture/TextureMap.java ++++ b/net/minecraft/client/renderer/texture/TextureMap.java +@@ -63,7 +63,6 @@ + private int iconGridCountY = -1; + private double iconGridSizeU = -1.0D; + private double iconGridSizeV = -1.0D; +- private static final String __OBFID = "CL_00001058"; + + public TextureMap(int par1, String par2Str) + { +@@ -243,41 +242,26 @@ + var261.addCrashSectionCallable("Sprite name", new Callable() + { + private static final String __OBFID = "CL_00001059"; +- private static final String __OBFID = "CL_00001059"; + public String call() + { + return sheetWidth1.getIconName(); + } +- public Object call() throws Exception +- { +- return this.call(); +- } + }); + var261.addCrashSectionCallable("Sprite size", new Callable() + { + private static final String __OBFID = "CL_00001060"; +- private static final String __OBFID = "CL_00001060"; + public String call() + { + return sheetWidth1.getIconWidth() + " x " + sheetWidth1.getIconHeight(); + } +- public Object call() throws Exception +- { +- return this.call(); +- } + }); + var261.addCrashSectionCallable("Sprite frames", new Callable() + { + private static final String __OBFID = "CL_00001061"; +- private static final String __OBFID = "CL_00001061"; + public String call() + { + return sheetWidth1.getFrameCount() + " frames"; + } +- public Object call() throws Exception +- { +- return this.call(); +- } + }); + var261.addCrashSection("Mipmap levels", Integer.valueOf(this.field_147636_j)); + throw new ReportedException(debugImage1); diff --git a/mcppatches/patches/net/minecraft/client/renderer/texture/TextureUtil.java.patch b/mcppatches/patches/net/minecraft/client/renderer/texture/TextureUtil.java.patch new file mode 100644 index 00000000..a0f48440 --- /dev/null +++ b/mcppatches/patches/net/minecraft/client/renderer/texture/TextureUtil.java.patch @@ -0,0 +1,10 @@ +--- a/net/minecraft/client/renderer/texture/TextureUtil.java ++++ b/net/minecraft/client/renderer/texture/TextureUtil.java +@@ -27,7 +27,6 @@ + private static float field_152779_g = -1.0F; + private static final int[] field_147957_g; + private static final String __OBFID = "CL_00001067"; +- private static final String __OBFID = "CL_00001067"; + + public static int glGenTextures() + { diff --git a/mcppatches/patches/net/minecraft/client/settings/GameSettings.java.patch b/mcppatches/patches/net/minecraft/client/settings/GameSettings.java.patch new file mode 100644 index 00000000..6a4226c5 --- /dev/null +++ b/mcppatches/patches/net/minecraft/client/settings/GameSettings.java.patch @@ -0,0 +1,42 @@ +--- a/net/minecraft/client/settings/GameSettings.java ++++ b/net/minecraft/client/settings/GameSettings.java +@@ -55,7 +55,6 @@ + private static final ParameterizedType typeListString = new ParameterizedType() + { + private static final String __OBFID = "CL_00000651"; +- private static final String __OBFID = "CL_00000651"; + public Type[] getActualTypeArguments() + { + return new Type[] {String.class}; +@@ -279,7 +278,6 @@ + public String language; + public boolean forceUnicodeFont; + private static final String __OBFID = "CL_00000650"; +- private static final String __OBFID = "CL_00000650"; + + public GameSettings(Minecraft par1Minecraft, File par2File) + { +@@ -3074,7 +3072,6 @@ + ANISOTROPIC_FILTERING("ANISOTROPIC_FILTERING", 32, "ANISOTROPIC_FILTERING", 32, "options.anisotropicFiltering", true, false, 1.0F, 16.0F, 0.0F, (Object)null, null) + { + private static final String __OBFID = "CL_00000654"; +- private static final String __OBFID = "CL_00000654"; + protected float snapToStep(float p_148264_1_) + { + return (float)MathHelper.roundUpToPowerOfTwo((int)p_148264_1_); +@@ -3164,7 +3161,6 @@ + private static final String __OBFID = "CL_00000653"; + + private static final GameSettings.Options[] $VALUES$ = new GameSettings.Options[]{INVERT_MOUSE, SENSITIVITY, FOV, GAMMA, SATURATION, RENDER_DISTANCE, VIEW_BOBBING, ANAGLYPH, ADVANCED_OPENGL, FRAMERATE_LIMIT, FBO_ENABLE, DIFFICULTY, GRAPHICS, AMBIENT_OCCLUSION, GUI_SCALE, RENDER_CLOUDS, PARTICLES, CHAT_VISIBILITY, CHAT_COLOR, CHAT_LINKS, CHAT_OPACITY, CHAT_LINKS_PROMPT, SNOOPER_ENABLED, USE_FULLSCREEN, ENABLE_VSYNC, SHOW_CAPE, TOUCHSCREEN, CHAT_SCALE, CHAT_WIDTH, CHAT_HEIGHT_FOCUSED, CHAT_HEIGHT_UNFOCUSED, MIPMAP_LEVELS, ANISOTROPIC_FILTERING, FORCE_UNICODE_FONT, STREAM_BYTES_PER_PIXEL, STREAM_VOLUME_MIC, STREAM_VOLUME_SYSTEM, STREAM_KBPS, STREAM_FPS, STREAM_COMPRESSION, STREAM_SEND_METADATA, STREAM_CHAT_ENABLED, STREAM_CHAT_USER_FILTER, STREAM_MIC_TOGGLE_BEHAVIOR, FOG_FANCY, FOG_START, MIPMAP_TYPE, LOAD_FAR, PRELOADED_CHUNKS, SMOOTH_FPS, CLOUDS, CLOUD_HEIGHT, TREES, GRASS, RAIN, WATER, ANIMATED_WATER, ANIMATED_LAVA, ANIMATED_FIRE, ANIMATED_PORTAL, AO_LEVEL, LAGOMETER, AUTOSAVE_TICKS, BETTER_GRASS, ANIMATED_REDSTONE, ANIMATED_EXPLOSION, ANIMATED_FLAME, ANIMATED_SMOKE, WEATHER, SKY, STARS, SUN_MOON, CHUNK_UPDATES, CHUNK_UPDATES_DYNAMIC, TIME, CLEAR_WATER, SMOOTH_WORLD, DEPTH_FOG, VOID_PARTICLES, WATER_PARTICLES, RAIN_SPLASH, PORTAL_PARTICLES, POTION_PARTICLES, PROFILER, DRIPPING_WATER_LAVA, BETTER_SNOW, FULLSCREEN_MODE, ANIMATED_TERRAIN, ANIMATED_ITEMS, SWAMP_COLORS, RANDOM_MOBS, SMOOTH_BIOMES, CUSTOM_FONTS, CUSTOM_COLORS, SHOW_CAPES, CONNECTED_TEXTURES, AA_LEVEL, ANIMATED_TEXTURES, NATURAL_TEXTURES, CHUNK_LOADING, HELD_ITEM_TOOLTIPS, DROPPED_ITEMS, LAZY_CHUNK_LOADING, CUSTOM_SKY, FAST_MATH, FAST_RENDER, TRANSLUCENT_BLOCKS}; +- private static final String __OBFID = "CL_00000653"; + + public static GameSettings.Options getEnumOptions(int par0) + { +@@ -3270,7 +3266,6 @@ + { + static final int[] optionIds = new int[GameSettings.Options.values().length]; + private static final String __OBFID = "CL_00000652"; +- private static final String __OBFID = "CL_00000652"; + + static + { diff --git a/mcppatches/patches/net/minecraft/client/shader/TesselatorVertexState.java.patch b/mcppatches/patches/net/minecraft/client/shader/TesselatorVertexState.java.patch new file mode 100644 index 00000000..66f74d8b --- /dev/null +++ b/mcppatches/patches/net/minecraft/client/shader/TesselatorVertexState.java.patch @@ -0,0 +1,10 @@ +--- a/net/minecraft/client/shader/TesselatorVertexState.java ++++ b/net/minecraft/client/shader/TesselatorVertexState.java +@@ -10,7 +10,6 @@ + private boolean hasNormals; + private boolean hasColor; + private static final String __OBFID = "CL_00000961"; +- private static final String __OBFID = "CL_00000961"; + + public TesselatorVertexState(int[] p_i45079_1_, int p_i45079_2_, int p_i45079_3_, boolean p_i45079_4_, boolean p_i45079_5_, boolean p_i45079_6_, boolean p_i45079_7_) + { diff --git a/mcppatches/patches/net/minecraft/profiler/Profiler.java.patch b/mcppatches/patches/net/minecraft/profiler/Profiler.java.patch new file mode 100644 index 00000000..65492c08 --- /dev/null +++ b/mcppatches/patches/net/minecraft/profiler/Profiler.java.patch @@ -0,0 +1,18 @@ +--- a/net/minecraft/profiler/Profiler.java ++++ b/net/minecraft/profiler/Profiler.java +@@ -36,7 +36,6 @@ + public long timeTickNano; + private long startUpdateChunksNano; + public long timeUpdateChunksNano; +- private static final String __OBFID = "CL_00001497"; + + public Profiler() + { +@@ -247,7 +246,6 @@ + public double field_76330_b; + public String field_76331_c; + private static final String __OBFID = "CL_00001498"; +- private static final String __OBFID = "CL_00001498"; + + public Result(String par1Str, double par2, double par4) + { diff --git a/mcppatches/patches/net/minecraft/server/integrated/IntegratedServer.java.patch b/mcppatches/patches/net/minecraft/server/integrated/IntegratedServer.java.patch new file mode 100644 index 00000000..210d96c8 --- /dev/null +++ b/mcppatches/patches/net/minecraft/server/integrated/IntegratedServer.java.patch @@ -0,0 +1,42 @@ +--- a/net/minecraft/server/integrated/IntegratedServer.java ++++ b/net/minecraft/server/integrated/IntegratedServer.java +@@ -36,7 +36,6 @@ + private boolean isPublic; + private ThreadLanServerPing lanServerPing; + private static final String __OBFID = "CL_00001129"; +- private static final String __OBFID = "CL_00001129"; + + public IntegratedServer(Minecraft par1Minecraft, String par2Str, String par3Str, WorldSettings par4WorldSettings) + { +@@ -253,20 +252,14 @@ + par1CrashReport.getCategory().addCrashSectionCallable("Type", new Callable() + { + private static final String __OBFID = "CL_00001130"; +- private static final String __OBFID = "CL_00001130"; + public String call() + { + return "Integrated Server (map_client.txt)"; + } +- public Object call() throws Exception +- { +- return this.call(); +- } + }); + par1CrashReport.getCategory().addCrashSectionCallable("Is Modded", new Callable() + { + private static final String __OBFID = "CL_00001131"; +- private static final String __OBFID = "CL_00001131"; + public String call() + { + String var1 = ClientBrandRetriever.getClientModName(); +@@ -281,10 +274,6 @@ + return !var1.equals("vanilla") ? "Definitely; Server brand changed to \'" + var1 + "\'" : (Minecraft.class.getSigners() == null ? "Very likely; Jar signature invalidated" : "Probably not. Jar signature remains and both client + server brands are untouched."); + } + } +- public Object call() throws Exception +- { +- return this.call(); +- } + }); + return par1CrashReport; + } diff --git a/mcppatches/patches/net/minecraft/server/management/PlayerManager.java.patch b/mcppatches/patches/net/minecraft/server/management/PlayerManager.java.patch new file mode 100644 index 00000000..19b17504 --- /dev/null +++ b/mcppatches/patches/net/minecraft/server/management/PlayerManager.java.patch @@ -0,0 +1,18 @@ +--- a/net/minecraft/server/management/PlayerManager.java ++++ b/net/minecraft/server/management/PlayerManager.java +@@ -57,7 +57,6 @@ + /** x, z direction vectors: east, south, west, north */ + private final int[][] xzDirectionsConst = new int[][] {{1, 0}, {0, 1}, { -1, 0}, {0, -1}}; + private static final String __OBFID = "CL_00001434"; +- private static final String __OBFID = "CL_00001434"; + + public PlayerManager(WorldServer par1Minecraft) + { +@@ -469,7 +468,6 @@ + private long previousWorldTime; + private static final String __OBFID = "CL_00001435"; + public boolean chunkLoaded; +- private static final String __OBFID = "CL_00001435"; + + public PlayerInstance(int par2, int par3) + { diff --git a/mcppatches/patches/net/minecraft/src/BlockUtils.java.patch b/mcppatches/patches/net/minecraft/src/BlockUtils.java.patch new file mode 100644 index 00000000..98774e23 --- /dev/null +++ b/mcppatches/patches/net/minecraft/src/BlockUtils.java.patch @@ -0,0 +1,43 @@ +--- a/net/minecraft/src/BlockUtils.java ++++ b/net/minecraft/src/BlockUtils.java +@@ -10,23 +10,23 @@ + + public static void setLightOpacity(Block block, int opacity) + { +- if (directAccessValid) +- { +- try +- { +- block.setLightOpacity(opacity); +- return; +- } +- catch (IllegalAccessError var3) +- { +- directAccessValid = false; +- +- if (!ForgeBlock_setLightOpacity.exists()) +- { +- throw var3; +- } +- } +- } ++// if (directAccessValid) ++// { ++// try ++// { ++// block.setLightOpacity(opacity); ++// return; ++// } ++// catch (IllegalAccessError var3) ++// { ++// directAccessValid = false; ++// ++// if (!ForgeBlock_setLightOpacity.exists()) ++// { ++// throw var3; ++// } ++// } ++// } + + Reflector.callVoid(block, ForgeBlock_setLightOpacity, new Object[] {Integer.valueOf(opacity)}); + } diff --git a/mcppatches/patches/net/minecraft/src/EntityUtils.java.patch b/mcppatches/patches/net/minecraft/src/EntityUtils.java.patch new file mode 100644 index 00000000..6c851da7 --- /dev/null +++ b/mcppatches/patches/net/minecraft/src/EntityUtils.java.patch @@ -0,0 +1,121 @@ +--- a/net/minecraft/src/EntityUtils.java ++++ b/net/minecraft/src/EntityUtils.java +@@ -14,68 +14,68 @@ + + public static int getEntityAge(EntityLivingBase elb) + { +- if (directEntityAge) +- { +- try +- { +- return elb.entityAge; +- } +- catch (IllegalAccessError var2) +- { +- directEntityAge = false; +- +- if (!ForgeEntityLivingBase_entityAge.exists()) +- { +- throw var2; +- } +- } +- } ++// if (directEntityAge) ++// { ++// try ++// { ++// return elb.entityAge; ++// } ++// catch (IllegalAccessError var2) ++// { ++// directEntityAge = false; ++// ++// if (!ForgeEntityLivingBase_entityAge.exists()) ++// { ++// throw var2; ++// } ++// } ++// } + + return ((Integer)Reflector.getFieldValue(elb, ForgeEntityLivingBase_entityAge)).intValue(); + } + + public static void setEntityAge(EntityLivingBase elb, int age) + { +- if (directEntityAge) +- { +- try +- { +- elb.entityAge = age; +- return; +- } +- catch (IllegalAccessError var3) +- { +- directEntityAge = false; +- +- if (!ForgeEntityLivingBase_entityAge.exists()) +- { +- throw var3; +- } +- } +- } ++// if (directEntityAge) ++// { ++// try ++// { ++// elb.entityAge = age; ++// return; ++// } ++// catch (IllegalAccessError var3) ++// { ++// directEntityAge = false; ++// ++// if (!ForgeEntityLivingBase_entityAge.exists()) ++// { ++// throw var3; ++// } ++// } ++// } + + Reflector.setFieldValue(elb, ForgeEntityLivingBase_entityAge, Integer.valueOf(age)); + } + + public static void despawnEntity(EntityLiving el) + { +- if (directDespawnEntity) +- { +- try +- { +- el.despawnEntity(); +- return; +- } +- catch (IllegalAccessError var2) +- { +- directDespawnEntity = false; +- +- if (!ForgeEntityLiving_despawnEntity.exists()) +- { +- throw var2; +- } +- } +- } ++// if (directDespawnEntity) ++// { ++// try ++// { ++// el.despawnEntity(); ++// return; ++// } ++// catch (IllegalAccessError var2) ++// { ++// directDespawnEntity = false; ++// ++// if (!ForgeEntityLiving_despawnEntity.exists()) ++// { ++// throw var2; ++// } ++// } ++// } + + Reflector.callVoid(el, ForgeEntityLiving_despawnEntity, new Object[0]); + } diff --git a/mcppatches/patches/net/minecraft/src/ResourceUtils.java.patch b/mcppatches/patches/net/minecraft/src/ResourceUtils.java.patch new file mode 100644 index 00000000..a199c76d --- /dev/null +++ b/mcppatches/patches/net/minecraft/src/ResourceUtils.java.patch @@ -0,0 +1,41 @@ +--- a/net/minecraft/src/ResourceUtils.java ++++ b/net/minecraft/src/ResourceUtils.java +@@ -11,22 +11,22 @@ + + public static File getResourcePackFile(AbstractResourcePack arp) + { +- if (directAccessValid) +- { +- try +- { +- return arp.resourcePackFile; +- } +- catch (IllegalAccessError var2) +- { +- directAccessValid = false; +- +- if (!ForgeAbstractResourcePack_resourcePackFile.exists()) +- { +- throw var2; +- } +- } +- } ++// if (directAccessValid) ++// { ++// try ++// { ++// return arp.resourcePackFile; ++// } ++// catch (IllegalAccessError var2) ++// { ++// directAccessValid = false; ++// ++// if (!ForgeAbstractResourcePack_resourcePackFile.exists()) ++// { ++// throw var2; ++// } ++// } ++// } + + return (File)Reflector.getFieldValue(arp, ForgeAbstractResourcePack_resourcePackFile); + } diff --git a/mcppatches/patches/net/minecraft/util/LongHashMap.java.patch b/mcppatches/patches/net/minecraft/util/LongHashMap.java.patch new file mode 100644 index 00000000..7bc97455 --- /dev/null +++ b/mcppatches/patches/net/minecraft/util/LongHashMap.java.patch @@ -0,0 +1,18 @@ +--- a/net/minecraft/util/LongHashMap.java ++++ b/net/minecraft/util/LongHashMap.java +@@ -21,7 +21,6 @@ + /** count of times elements have been added/removed */ + private transient volatile int modCount; + private static final String __OBFID = "CL_00001492"; +- private static final String __OBFID = "CL_00001492"; + + public LongHashMap() + { +@@ -254,7 +253,6 @@ + LongHashMap.Entry nextEntry; + final int hash; + private static final String __OBFID = "CL_00001493"; +- private static final String __OBFID = "CL_00001493"; + + Entry(int par1, long par2, Object par4Obj, LongHashMap.Entry par5LongHashMapEntry) + { diff --git a/mcppatches/patches/net/minecraft/util/MathHelper.java.patch b/mcppatches/patches/net/minecraft/util/MathHelper.java.patch new file mode 100644 index 00000000..7bc9fc87 --- /dev/null +++ b/mcppatches/patches/net/minecraft/util/MathHelper.java.patch @@ -0,0 +1,10 @@ +--- a/net/minecraft/util/MathHelper.java ++++ b/net/minecraft/util/MathHelper.java +@@ -32,7 +32,6 @@ + */ + private static final int[] multiplyDeBruijnBitPosition; + private static final String __OBFID = "CL_00001496"; +- private static final String __OBFID = "CL_00001496"; + + /** + * sin looked up in a table diff --git a/mcppatches/patches/net/minecraft/world/ChunkCoordIntPair.java.patch b/mcppatches/patches/net/minecraft/world/ChunkCoordIntPair.java.patch new file mode 100644 index 00000000..7dfd0231 --- /dev/null +++ b/mcppatches/patches/net/minecraft/world/ChunkCoordIntPair.java.patch @@ -0,0 +1,10 @@ +--- a/net/minecraft/world/ChunkCoordIntPair.java ++++ b/net/minecraft/world/ChunkCoordIntPair.java +@@ -9,7 +9,6 @@ + public final int chunkZPos; + private static final String __OBFID = "CL_00000133"; + private int cachedHashCode = 0; +- private static final String __OBFID = "CL_00000133"; + + public ChunkCoordIntPair(int par1, int par2) + { diff --git a/mcppatches/patches/net/minecraft/world/GameRules.java.patch b/mcppatches/patches/net/minecraft/world/GameRules.java.patch new file mode 100644 index 00000000..932892ff --- /dev/null +++ b/mcppatches/patches/net/minecraft/world/GameRules.java.patch @@ -0,0 +1,18 @@ +--- a/net/minecraft/world/GameRules.java ++++ b/net/minecraft/world/GameRules.java +@@ -9,7 +9,6 @@ + { + private TreeMap theGameRules = new TreeMap(); + private static final String __OBFID = "CL_00000136"; +- private static final String __OBFID = "CL_00000136"; + + public GameRules() + { +@@ -121,7 +120,6 @@ + private int valueInteger; + private double valueDouble; + private static final String __OBFID = "CL_00000137"; +- private static final String __OBFID = "CL_00000137"; + + public Value(String par1Str) + { diff --git a/mcppatches/patches/net/minecraft/world/SpawnerAnimals.java.patch b/mcppatches/patches/net/minecraft/world/SpawnerAnimals.java.patch new file mode 100644 index 00000000..509ec28d --- /dev/null +++ b/mcppatches/patches/net/minecraft/world/SpawnerAnimals.java.patch @@ -0,0 +1,10 @@ +--- a/net/minecraft/world/SpawnerAnimals.java ++++ b/net/minecraft/world/SpawnerAnimals.java +@@ -26,7 +26,6 @@ + private Map mapSampleEntitiesByClass = new HashMap(); + private int lastPlayerChunkX = Integer.MAX_VALUE; + private int lastPlayerChunkZ = Integer.MAX_VALUE; +- private static final String __OBFID = "CL_00000152"; + + protected static ChunkPosition func_151350_a(World p_151350_0_, int p_151350_1_, int p_151350_2_) + { diff --git a/minecriftversion.py b/minecriftversion.py index fd03dc57..287ada97 100644 --- a/minecriftversion.py +++ b/minecriftversion.py @@ -4,7 +4,7 @@ of_json_name = "1.7.10_HD_U_A4" of_file_md5 = "ff3fd4c98e267d9d9eeb1296edfba5aa" minecrift_version_num = "1.7.10" -minecrift_build = "PRE5a1" +minecrift_build = "A1" of_file_extension = ".jar" mcp_version = "mcp908" forge_version = "10.13.0.1180" \ No newline at end of file