mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-21 10:26:38 +00:00
Generator: fixed a couple of hardcoded block IDs
This commit is contained in:
parent
c243daabe1
commit
95606b6e04
@ -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());
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user