Fix local variable conflict in Forge patch and latest MCP mappings.

This commit is contained in:
Lex Manos committed 2014-11-26 01:12:11 -08:00
1 parent 53659fca06
commit 277fc4ea7d
1 file changed
+10 -12
@@ -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 @@
}
}
}