mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
Partial ChunkData sending, NACK handling, Queues
This commit is contained in:
parent
063f44c330
commit
6ef600942b
4 changed files with 140 additions and 186 deletions
|
|
@ -44,9 +44,9 @@ class LevelAPI{
|
|||
}
|
||||
|
||||
public function getChunk($X, $Z){
|
||||
/*if($this->check() and isset($this->map->map[$X][$Z])){
|
||||
if($this->check() and isset($this->map->map[$X][$Z])){
|
||||
return $this->map->map[$X][$Z];
|
||||
}*/
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -62,11 +62,11 @@ class LevelAPI{
|
|||
for($j = 0; $j < $columnsPerPacket; ++$j){
|
||||
$ordered[$i] .= "\xff";
|
||||
for($k = 0; $k < 8; ++$k){
|
||||
$ordered[$i] .= substr($c[$i][0], $k << 4, 16); //Block data
|
||||
$ordered[$i] .= substr($c[$i][1], $k << 3, 8); //Meta data
|
||||
$ordered[$i] .= substr($c[0][$i+$j], $k << 4, 16); //Block data
|
||||
$ordered[$i] .= substr($c[1][$i+$j], $k << 3, 8); //Meta data
|
||||
}
|
||||
++$i;
|
||||
}
|
||||
$i += $columnsPerPacket;
|
||||
}
|
||||
return $ordered;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue