From 90effd173b5cf45c9b8b417de87f146ec5fcf194 Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Date: Sun, 26 May 2013 19:57:41 +0200 Subject: [PATCH] Faster chunk sending algorithm --- src/world/Level.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/world/Level.php b/src/world/Level.php index 73a35a2ce..294a43204 100644 --- a/src/world/Level.php +++ b/src/world/Level.php @@ -276,10 +276,7 @@ class Level{ $ordered = ""; $flag = chr(1 << $Y); for($j = 0; $j < 256; ++$j){ - $index = $j << 5; - $ordered .= $flag; - $ordered .= substr($raw, $index, 16); - $ordered .= substr($raw, $index + 16, 8); + $ordered .= $flag . substr($raw, $j << 5, 24); //16 + 8 } return $ordered; }