From d1adf00158abb9f5491ab0348f982e6c222173dc Mon Sep 17 00:00:00 2001 From: LexManos Date: Fri, 1 Feb 2019 00:46:29 -0800 Subject: [PATCH] Written size does not include int bytes. --- .../net/minecraft/world/chunk/storage/RegionFile.java.patch | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/patches/minecraft/net/minecraft/world/chunk/storage/RegionFile.java.patch b/patches/minecraft/net/minecraft/world/chunk/storage/RegionFile.java.patch index 1834ee7c67..5fc191f763 100644 --- a/patches/minecraft/net/minecraft/world/chunk/storage/RegionFile.java.patch +++ b/patches/minecraft/net/minecraft/world/chunk/storage/RegionFile.java.patch @@ -22,7 +22,7 @@ + if ((k >> 8) <= this.field_76714_f.size()) + { // We're maxed out, so we need to read the proper length from the section + this.field_76719_c.seek((k >> 8) * 4096); -+ length = (this.field_76719_c.readInt() / 4096) + 1; ++ length = (this.field_76719_c.readInt() + 4)/ 4096 + 1; + this.field_76719_c.seek(j1 * 4 + 4); //Go back to where we were + } + } @@ -58,7 +58,7 @@ + if (k == 255) + { + this.field_76719_c.seek(j * 4096); -+ k = this.field_76719_c.readInt() / 4096 + 1; ++ k = (this.field_76719_c.readInt() + 4) / 4096 + 1; + } if (j + k > this.field_76714_f.size()) @@ -83,7 +83,7 @@ + if (k == 255) + { + this.field_76719_c.seek(j * 4096); -+ k = this.field_76719_c.readInt() / 4096 + 1; ++ k = (this.field_76719_c.readInt() + 4) / 4096 + 1; + } int l = (p_76706_4_ + 5) / 4096 + 1;