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 = ($z + 0.5 - $seedZ) / $size;
|
||||||
$sizeZ *= $sizeZ;
|
$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());
|
$level->setBlockIdAt($x, $y, $z, $this->type->material->getId());
|
||||||
if($this->type->material->getDamage() !== 0){
|
if($this->type->material->getDamage() !== 0){
|
||||||
$level->setBlockDataAt($x, $y, $z, $this->type->material->getDamage());
|
$level->setBlockDataAt($x, $y, $z, $this->type->material->getDamage());
|
||||||
|
@ -68,7 +68,7 @@ class Tree extends Populator{
|
|||||||
$b = $this->level->getBlockIdAt($x, $y, $z);
|
$b = $this->level->getBlockIdAt($x, $y, $z);
|
||||||
if($b === Block::DIRT or $b === Block::GRASS){
|
if($b === Block::DIRT or $b === Block::GRASS){
|
||||||
break;
|
break;
|
||||||
}elseif($b !== 0 and $b !== Block::SNOW_LAYER){
|
}elseif($b !== Block::AIR and $b !== Block::SNOW_LAYER){
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user