From 277fc4ea7d7ac12374f9e65bf3540ebda19c6e79 Mon Sep 17 00:00:00 2001 From: Lex Manos Date: Wed, 26 Nov 2014 01:12:11 -0800 Subject: [PATCH] Fix local variable conflict in Forge patch and latest MCP mappings. --- .../chunk/storage/AnvilChunkLoader.java.patch | 22 +++++++++---------- 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/patches/minecraft/net/minecraft/world/chunk/storage/AnvilChunkLoader.java.patch b/patches/minecraft/net/minecraft/world/chunk/storage/AnvilChunkLoader.java.patch index 44b0a56f6..73c9f8875 100644 --- a/patches/minecraft/net/minecraft/world/chunk/storage/AnvilChunkLoader.java.patch +++ b/patches/minecraft/net/minecraft/world/chunk/storage/AnvilChunkLoader.java.patch @@ -91,23 +91,21 @@ if (!p_75822_4_.func_150297_b("Level", 10)) { field_151505_a.error("Chunk file at " + p_75822_2_ + "," + p_75822_3_ + " is missing level data, skipping"); -@@ -100,10 +147,29 @@ +@@ -100,10 +147,27 @@ field_151505_a.error("Chunk file at " + p_75822_2_ + "," + p_75822_3_ + " is in the wrong location; relocating. (Expected " + p_75822_2_ + ", " + p_75822_3_ + ", got " + chunk.field_76635_g + ", " + chunk.field_76647_h + ")"); p_75822_4_.func_74768_a("xPos", p_75822_2_); p_75822_4_.func_74768_a("zPos", p_75822_3_); + + // Have to move tile entities since we don't load them at this stage -+ NBTTagList tileEntities = p_75822_4_.func_74775_l("Level").func_150295_c("TileEntities", 10); ++ NBTTagList _tileEntities = p_75822_4_.func_74775_l("Level").func_150295_c("TileEntities", 10); + -+ if (tileEntities != null) ++ if (_tileEntities != null) + { -+ for (int te = 0; te < tileEntities.func_74745_c(); te++) ++ for (int te = 0; te < _tileEntities.func_74745_c(); te++) + { -+ NBTTagCompound tileEntity = (NBTTagCompound) tileEntities.func_150305_b(te); -+ int x = tileEntity.func_74762_e("x") - chunk.field_76635_g * 16; -+ int z = tileEntity.func_74762_e("z") - chunk.field_76647_h * 16; -+ tileEntity.func_74768_a("x", p_75822_2_ * 16 + x); -+ tileEntity.func_74768_a("z", p_75822_3_ * 16 + z); ++ NBTTagCompound _nbt = (NBTTagCompound) _tileEntities.func_150305_b(te); ++ _nbt.func_74768_a("x", p_75822_2_ * 16 + (_nbt.func_74762_e("x") - chunk.field_76635_g * 16)); ++ _nbt.func_74768_a("z", p_75822_3_ * 16 + (_nbt.func_74762_e("z") - chunk.field_76647_h * 16)); + } + } chunk = this.func_75823_a(p_75822_1_, p_75822_4_.func_74775_l("Level")); @@ -123,7 +121,7 @@ } } -@@ -117,6 +183,7 @@ +@@ -117,6 +181,7 @@ NBTTagCompound nbttagcompound1 = new NBTTagCompound(); nbttagcompound.func_74782_a("Level", nbttagcompound1); this.func_75820_a(p_75816_2_, p_75816_1_, nbttagcompound1); @@ -131,7 +129,7 @@ this.func_75824_a(p_75816_2_.func_76632_l(), nbttagcompound); } catch (Exception exception) -@@ -404,6 +471,12 @@ +@@ -404,6 +469,12 @@ chunk.func_76616_a(p_75823_2_.func_74770_j("Biomes")); } @@ -144,7 +142,7 @@ NBTTagList nbttaglist1 = p_75823_2_.func_150295_c("Entities", 10); if (nbttaglist1 != null) -@@ -475,8 +548,6 @@ +@@ -475,8 +546,6 @@ } } }