diff --git a/forge/patches/minecraft/net/minecraft/src/Chunk.java.patch b/forge/patches/minecraft/net/minecraft/src/Chunk.java.patch index 470931596..866c6fc18 100644 --- a/forge/patches/minecraft/net/minecraft/src/Chunk.java.patch +++ b/forge/patches/minecraft/net/minecraft/src/Chunk.java.patch @@ -167,10 +167,13 @@ int var5 = 0; int var6; -@@ -1331,6 +1341,29 @@ - TileEntity var9 = (TileEntity)var10.next(); - var9.updateContainingBlockInfo(); +@@ -1324,12 +1334,26 @@ } + + this.generateHeightMap(); +- Iterator var10 = this.chunkTileEntityMap.values().iterator(); +- +- while (var10.hasNext()) + + List invalidList = new ArrayList(); + iterator = chunkTileEntityMap.values().iterator(); @@ -180,24 +183,23 @@ + int x = tileEntity.xCoord & 15; + int y = tileEntity.yCoord; + int z = tileEntity.zCoord & 15; -+ /* This function is called when an entire chunk is sent, so we don't need to check the bounds. -+ if (x >= xStart && x <= xStop && y >= yStart && y <= yEnd && z >= zStart && z <= zStop) -+ */ + Block block = tileEntity.getBlockType(); + if (block == null || block.blockID != getBlockID(x, y, z) || tileEntity.getBlockMetadata() != getBlockMetadata(x, y, z)) + { + invalidList.add(tileEntity); + } ++ tileEntity.updateContainingBlockInfo(); + } + + for (TileEntity tileEntity : invalidList) -+ { + { +- TileEntity var9 = (TileEntity)var10.next(); +- var9.updateContainingBlockInfo(); + tileEntity.invalidate(); -+ } + } } - public BiomeGenBase func_48490_a(int par1, int par2, WorldChunkManager par3WorldChunkManager) -@@ -1435,4 +1468,18 @@ +@@ -1435,4 +1459,18 @@ } } }