Skip to content

Commit

Permalink
Added placeholder for sky light
Browse files Browse the repository at this point in the history
  • Loading branch information
shoghicp committed Dec 2, 2014
1 parent 3304b41 commit a150aca
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/shoghicp/BigBrother/tasks/McRegionToAnvil.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
}
Expand All @@ -95,6 +95,7 @@ public function onRun(){
$blockLight[$Y] = $final;
}

/*
foreach($skyLight as $Y => $data){
$final = "";
$len = count($data);
Expand All @@ -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);
}
Expand Down

0 comments on commit a150aca

Please sign in to comment.