diff --git a/getchanges.py b/getchanges.py index 853ba4c2..4a0b0aef 100644 --- a/getchanges.py +++ b/getchanges.py @@ -30,31 +30,35 @@ def create_patch( target_dir, src_file, mod_file, label, patch_file ): with open( patch_file, 'wb') as out: out.write( stdout.replace('\r\n','\n').replace('\r','\n') ) +def pythonisdumb(func, path, excinfo): + print path + str(excinfo) + def main(mcp_dir, patch_dir = "patches", orig_dir = ".minecraft_orig"): new_src_dir = os.path.join( base_dir , "src" ) patch_base_dir = os.path.join( base_dir , patch_dir ) patchsrc_base_dir = os.path.join( base_dir , "patchsrc" ) assets_base_dir = os.path.join(base_dir, "assets", "vivecraft" ) - try: - shutil.rmtree( new_src_dir ) - shutil.rmtree( patch_base_dir ) - shutil.rmtree( patchsrc_base_dir ) - shutil.rmtree( assets_base_dir ) + try: + shutil.rmtree( new_src_dir, onerror=pythonisdumb, ignore_errors=True) + shutil.rmtree( patch_base_dir, onerror=pythonisdumb, ignore_errors=True) + shutil.rmtree( patchsrc_base_dir, onerror=pythonisdumb, ignore_errors=True) + shutil.rmtree( assets_base_dir, onerror=pythonisdumb, ignore_errors=True) + + if not os.path.exists( new_src_dir ): + os.mkdir( new_src_dir ) + + if not os.path.exists( patch_base_dir ): + os.mkdir( patch_base_dir ) + + if not os.path.exists( patchsrc_base_dir ): + os.mkdir( patchsrc_base_dir ) + + if not os.path.exists( assets_base_dir ): + os.makedirs( assets_base_dir ) + except OSError as e: - pass - - if not os.path.exists( new_src_dir ): - os.mkdir( new_src_dir ) - - if not os.path.exists( patch_base_dir ): - os.mkdir( patch_base_dir ) - - if not os.path.exists( patchsrc_base_dir ): - os.mkdir( patchsrc_base_dir ) - - if not os.path.exists( assets_base_dir ): - os.makedirs( assets_base_dir ) + quit mod_src_dir = os.path.join( mcp_dir , "src", "minecraft" ) assets_src_dir = os.path.join( mcp_dir , "src", "assets" ) diff --git a/installer/Installer.java b/installer/Installer.java index 63dfcca6..6dd383e1 100644 --- a/installer/Installer.java +++ b/installer/Installer.java @@ -65,8 +65,8 @@ public class Installer extends JPanel implements PropertyChangeListener private static String FORGE_VERSION = "10.13.4.1614-1.7.10"; /* END OF DO NOT RENAME */ - private static final String DEFAULT_PROFILE_NAME = "ViveCraft " + MINECRAFT_VERSION; - private static final String DEFAULT_PROFILE_NAME_FORGE = "ViveCraft-Forge " + MINECRAFT_VERSION; + private static final String DEFAULT_PROFILE_NAME = "Vivecraft " + MINECRAFT_VERSION; + private static final String DEFAULT_PROFILE_NAME_FORGE = "Vivecraft-Forge " + MINECRAFT_VERSION; private static final String GITHUB_LINK = "https://github.com/jrbudda/Vivecraft_112"; private static final String HOMEPAGE_LINK = "http://www.vivecraft.org"; private static final String DONATION_LINK = "https://www.patreon.com/jrbudda"; diff --git a/minecriftversion.py b/minecriftversion.py index e589e4e0..931a5813 100644 --- a/minecriftversion.py +++ b/minecriftversion.py @@ -4,7 +4,7 @@ of_json_name = "1.7.10_HD_U_D1" of_file_md5 = "57c724fe8335c82aef8d54c101043e60" minecrift_version_num = "1.7.10" -minecrift_build = "jrbudda-40r6" +minecrift_build = "jrbudda-40r8" of_file_extension = ".jar" mcp_version = "mcp908" mcp_uses_generics = False diff --git a/patches/net/minecraft/client/Minecraft.java.patch b/patches/net/minecraft/client/Minecraft.java.patch index 47c3f3af..85a1c319 100644 --- a/patches/net/minecraft/client/Minecraft.java.patch +++ b/patches/net/minecraft/client/Minecraft.java.patch @@ -1246,7 +1246,7 @@ + * The minecriftVerString will be automatically updated by the build scripts, do not modify here. + * Modify minecriftversion.py in root minecrift dir. + */ -+ public final String minecriftVerString = "Vivecraft 1.7.10 jrbudda-40r6"; ++ public final String minecriftVerString = "Vivecraft 1.7.10 jrbudda-40r8"; + private boolean trigger; + /* end version */ + /** END MINECRIFT */ diff --git a/patches/net/minecraft/network/NetHandlerPlayServer.java.patch b/patches/net/minecraft/network/NetHandlerPlayServer.java.patch index 3742c34a..dbb62049 100644 --- a/patches/net/minecraft/network/NetHandlerPlayServer.java.patch +++ b/patches/net/minecraft/network/NetHandlerPlayServer.java.patch @@ -111,37 +111,6 @@ { return; } -@@ -1129,20 +1133,20 @@ - { - var3 = var2.readItemStackFromBuffer(); - -- if (var3 != null) -+ if (var3 == null) - { -- if (!ItemWritableBook.validBookPageTagContents(var3.getTagCompound())) -- { -- throw new IOException("Invalid book tag!"); -- } -+ return; -+ } - -- var4 = this.playerEntity.inventory.getCurrentItem(); -+ if (!ItemWritableBook.validBookPageTagContents(var3.getTagCompound())) -+ { -+ throw new IOException("Invalid book tag!"); -+ } - -- if (var4 == null) -- { -- return; -- } -+ var4 = this.playerEntity.inventory.getCurrentItem(); - -+ if (var4 != null) -+ { - if (var3.getItem() == Items.writable_book && var3.getItem() == var4.getItem()) - { - var4.setTagInfo("pages", var3.getTagCompound().getTagList("pages", 8)); @@ -1333,6 +1337,24 @@ var41.updateItemName(""); } diff --git a/patches/net/minecraft/src/VersionCheckThread.java.patch b/patches/net/minecraft/src/VersionCheckThread.java.patch deleted file mode 100644 index 3c4c16f6..00000000 --- a/patches/net/minecraft/src/VersionCheckThread.java.patch +++ /dev/null @@ -1,26 +0,0 @@ ---- a/net/minecraft/src/VersionCheckThread.java -+++ b/net/minecraft/src/VersionCheckThread.java -@@ -40,16 +40,16 @@ - in.close(); - String[] verLines = Config.tokenize(verStr, "\n\r"); - -- if (verLines.length >= 1) -+ if (verLines.length < 1) - { -- String newVer = verLines[0]; -- Config.dbg("Version found: " + newVer); -+ return; -+ } - -- if (Config.compareRelease(newVer, "D1") <= 0) -- { -- return; -- } -+ String newVer = verLines[0]; -+ Config.dbg("Version found: " + newVer); - -+ if (Config.compareRelease(newVer, "D1") > 0) -+ { - Config.setNewRelease(newVer); - return; - }