fixed reactor structure

This commit is contained in:
GameHerobrine 2023-01-28 21:43:18 +03:00
parent c3750014a9
commit eb3f2d8bb1
2 changed files with 339 additions and 339 deletions

View file

@ -188,7 +188,7 @@ class NetherReactorBlock extends SolidBlock{
foreach($this->core as $yOffset => $layer){ foreach($this->core as $yOffset => $layer){
foreach($layer as $line){ foreach($layer as $line){
foreach(str_split($line) as $char){ foreach(str_split($line) as $char){
$b = $this->level->getBlock(new Vector3($x + $offsetX, $y + $yOffset, $z + $offsetZ)); $b = $this->level->getBlock(new Vector3($x + $offsetX, $y + $yOffset, $z + $offsetZ))->getID();
switch($char){ switch($char){
case "G": case "G":
if($b === GOLD_BLOCK){ //TODO make it use structure class if($b === GOLD_BLOCK){ //TODO make it use structure class
@ -206,7 +206,7 @@ class NetherReactorBlock extends SolidBlock{
} }
return false; return false;
case " ": case " ":
if($b->getID() === 0){ if($b === 0){
break; break;
} }
return false; return false;