mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39: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 = "";
|
||||
$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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue