From 40b43a911e49aea1620f3d5484ab154e3b1bfd24 Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Pueyo Date: Sun, 17 Mar 2013 17:26:15 +0100 Subject: [PATCH] Optimization --- src/world/generator/SuperflatGenerator.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/world/generator/SuperflatGenerator.class.php b/src/world/generator/SuperflatGenerator.class.php index 95b21be0..a5d283d2 100644 --- a/src/world/generator/SuperflatGenerator.class.php +++ b/src/world/generator/SuperflatGenerator.class.php @@ -69,7 +69,7 @@ class SuperflatGenerator{ $meta = (int) @array_shift($d); for($j = 0; $j < $num; ++$j){ $this->structure[0] .= chr($block & 0xFF); - $this->structure[1] .= substr(dechex($meta & 0x0F), -1); + $this->structure[1] .= dechex($meta & 0x0F); } } $this->structure[1] = pack("h*", str_pad($this->structure[1], (strlen($this->structure[1])&0xFE) + 2, "0", STR_PAD_RIGHT)); //invert nibbles