Optimization

This commit is contained in:
Shoghi Cervantes Pueyo 2013-03-17 17:26:15 +01:00
parent 012c86ef00
commit 40b43a911e

View File

@ -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