mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-22 04:29:43 +00:00
Faster chunk sending algorithm
This commit is contained in:
parent
fc80a85c8c
commit
90effd173b
1 changed files with 1 additions and 4 deletions
|
|
@ -276,10 +276,7 @@ class Level{
|
||||||
$ordered = "";
|
$ordered = "";
|
||||||
$flag = chr(1 << $Y);
|
$flag = chr(1 << $Y);
|
||||||
for($j = 0; $j < 256; ++$j){
|
for($j = 0; $j < 256; ++$j){
|
||||||
$index = $j << 5;
|
$ordered .= $flag . substr($raw, $j << 5, 24); //16 + 8
|
||||||
$ordered .= $flag;
|
|
||||||
$ordered .= substr($raw, $index, 16);
|
|
||||||
$ordered .= substr($raw, $index + 16, 8);
|
|
||||||
}
|
}
|
||||||
return $ordered;
|
return $ordered;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue