mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-30 23:29:54 +00:00
Fixed block data network sending (Anvil::getBlockDataColumn()
This commit is contained in:
parent
189accc0d6
commit
20759dcf07
@ -148,8 +148,8 @@ class ChunkSection implements \pocketmine\level\format\ChunkSection{
|
|||||||
public function getBlockDataColumn($x, $z){
|
public function getBlockDataColumn($x, $z){
|
||||||
$i = ($z << 3) + ($x >> 1);
|
$i = ($z << 3) + ($x >> 1);
|
||||||
$column = "";
|
$column = "";
|
||||||
for($y = 0; $y < 8; ++$y){
|
for($y = 0; $y < 16; $y += 2){
|
||||||
$column .= $this->data{($y << 7) + $i};
|
$column .= ($this->data{($y << 7) + $i} & "\x0f") | ($this->data{(($y + 1) << 7) + $i} & "\xf0");
|
||||||
}
|
}
|
||||||
|
|
||||||
return $column;
|
return $column;
|
||||||
@ -158,8 +158,8 @@ class ChunkSection implements \pocketmine\level\format\ChunkSection{
|
|||||||
public function getBlockSkyLightColumn($x, $z){
|
public function getBlockSkyLightColumn($x, $z){
|
||||||
$i = ($z << 3) + ($x >> 1);
|
$i = ($z << 3) + ($x >> 1);
|
||||||
$column = "";
|
$column = "";
|
||||||
for($y = 0; $y < 8; ++$y){
|
for($y = 0; $y < 16; $y += 2){
|
||||||
$column .= $this->skyLight{($y << 7) + $i};
|
$column .= ($this->skyLight{($y << 7) + $i} & "\x0f") | ($this->skyLight{(($y + 1) << 7) + $i} & "\xf0");
|
||||||
}
|
}
|
||||||
|
|
||||||
return $column;
|
return $column;
|
||||||
@ -168,8 +168,8 @@ class ChunkSection implements \pocketmine\level\format\ChunkSection{
|
|||||||
public function getBlockLightColumn($x, $z){
|
public function getBlockLightColumn($x, $z){
|
||||||
$i = ($z << 3) + ($x >> 1);
|
$i = ($z << 3) + ($x >> 1);
|
||||||
$column = "";
|
$column = "";
|
||||||
for($y = 0; $y < 8; ++$y){
|
for($y = 0; $y < 16; $y += 2){
|
||||||
$column .= $this->blockLight{($y << 7) + $i};
|
$column .= ($this->blockLight{($y << 7) + $i} & "\x0f") | ($this->blockLight{(($y + 1) << 7) + $i} & "\xf0");
|
||||||
}
|
}
|
||||||
|
|
||||||
return $column;
|
return $column;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user