Generator: fixed a couple of hardcoded block IDs

This commit is contained in:
Dylan K. Taylor 2018-03-18 18:03:23 +00:00
parent c243daabe1
commit 95606b6e04
2 changed files with 2 additions and 2 deletions

View File

@ -84,7 +84,7 @@ class Ore{
$sizeZ = ($z + 0.5 - $seedZ) / $size;
$sizeZ *= $sizeZ;
if(($sizeX + $sizeY + $sizeZ) < 1 and $level->getBlockIdAt($x, $y, $z) === 1){
if(($sizeX + $sizeY + $sizeZ) < 1 and $level->getBlockIdAt($x, $y, $z) === Block::STONE){
$level->setBlockIdAt($x, $y, $z, $this->type->material->getId());
if($this->type->material->getDamage() !== 0){
$level->setBlockDataAt($x, $y, $z, $this->type->material->getDamage());

View File

@ -68,7 +68,7 @@ class Tree extends Populator{
$b = $this->level->getBlockIdAt($x, $y, $z);
if($b === Block::DIRT or $b === Block::GRASS){
break;
}elseif($b !== 0 and $b !== Block::SNOW_LAYER){
}elseif($b !== Block::AIR and $b !== Block::SNOW_LAYER){
return -1;
}
}