From a150aca892498d2f9dbe4b6b572ccd1a2114949d Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Date: Tue, 2 Dec 2014 19:04:20 +0100 Subject: [PATCH] Added placeholder for sky light --- src/shoghicp/BigBrother/tasks/McRegionToAnvil.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/shoghicp/BigBrother/tasks/McRegionToAnvil.php b/src/shoghicp/BigBrother/tasks/McRegionToAnvil.php index b0346d83..8d1f1882 100644 --- a/src/shoghicp/BigBrother/tasks/McRegionToAnvil.php +++ b/src/shoghicp/BigBrother/tasks/McRegionToAnvil.php @@ -71,16 +71,16 @@ public function onRun(){ if(($y & 1) === 0){ $data = ord($this->blockData[$halfIndex]) & 0x0F; $bLight = ord($this->blockLight[$halfIndex]) & 0x0F; - $sLight = ord($this->blockSkyLight[$halfIndex]) & 0x0F; + //$sLight = ord($this->blockSkyLight[$halfIndex]) & 0x0F; }else{ $data = ord($this->blockData[$halfIndex]) >> 4; $bLight = ord($this->blockLight[$halfIndex]) >> 4; - $sLight = ord($this->blockSkyLight[$halfIndex]) >> 4; + //$sLight = ord($this->blockSkyLight[$halfIndex]) >> 4; } $ids[$Y] .= pack("v", (ord($this->blockIds[$index]) << 4) | $data); $blockLight[$Y][] = $bLight; - $skyLight[$Y][] = $sLight; + //$skyLight[$Y][] = $sLight; } } } @@ -95,6 +95,7 @@ public function onRun(){ $blockLight[$Y] = $final; } + /* foreach($skyLight as $Y => $data){ $final = ""; $len = count($data); @@ -103,6 +104,9 @@ public function onRun(){ } $skyLight[$Y] = $final; } + */ + + $skyLight = [$half = str_repeat("\xff", 4096), $half, $half, $half, $half, $half, $half, $half]; $this->setResult(implode($ids) . implode($blockLight) . implode($skyLight) . $this->biomeIds); }