reactor fix

This commit is contained in:
GameHerobrine 2023-01-27 10:44:40 +03:00
parent 940797b16f
commit d83cb91c6c

View file

@ -70,7 +70,7 @@ class NetherReactorBlock extends SolidBlock{
} }
private function pigmenCheck($x,$y,$z) { private function pigmenCheck($x,$y,$z) {
$pigCount = 0; a $pigCount = 0;
$server = ServerAPI::request(); $server = ServerAPI::request();
$allEntities = $server->api->entity->entities; $allEntities = $server->api->entity->entities;
foreach($allEntities as $entity) { foreach($allEntities as $entity) {
@ -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->getBlockWithoutVector(new Vector3($x + $offsetX, $y + $yOffset, $z + $offsetZ)); $b = $this->level->getBlock(new Vector3($x + $offsetX, $y + $yOffset, $z + $offsetZ));
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