From 17151718aa80a7d4daa117ff2768a40699269c10 Mon Sep 17 00:00:00 2001 From: Zach Laster Date: Wed, 21 Nov 2012 14:56:17 +0200 Subject: [PATCH] Fixes ordering for z & x loops (proper array increment order) The ordering before would skip about in the ids and metadata arrays. This runs linearly and should improve performance. Done live on github --- patches/common/net/minecraft/src/Chunk.java.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/patches/common/net/minecraft/src/Chunk.java.patch b/patches/common/net/minecraft/src/Chunk.java.patch index f40d2ebb8e..87f15f3bc1 100644 --- a/patches/common/net/minecraft/src/Chunk.java.patch +++ b/patches/common/net/minecraft/src/Chunk.java.patch @@ -86,9 +86,9 @@ + + for (int y = 0; y < max; ++y) + { -+ for (int x = 0; x < 16; ++x) ++ for (int z = 0; z < 16; ++z) + { -+ for (int z = 0; z < 16; ++z) ++ for (int x = 0; x < 16; ++x) + { + int idx = y << 8 | z << 4 | x; + int id = ids[idx] & 0xFFFFFF;