GroundCover: don't replace liquid with can-be-flowed-into blocks

fixes snow layers generating underwater
This commit is contained in:
Dylan K. Taylor 2018-06-08 11:15:19 +01:00
parent 78ec3937bf
commit 8cd311bcb4

View File

@ -24,6 +24,7 @@ declare(strict_types=1);
namespace pocketmine\level\generator\populator;
use pocketmine\block\BlockFactory;
use pocketmine\block\Liquid;
use pocketmine\level\biome\Biome;
use pocketmine\level\ChunkManager;
use pocketmine\utils\Random;
@ -55,6 +56,9 @@ class GroundCover extends Populator{
if($column{$y} === "\x00" and $b->isSolid()){
break;
}
if($b->canBeFlowedInto() and BlockFactory::get(ord($column{$y})) instanceof Liquid){
continue;
}
if($b->getDamage() === 0){
$chunk->setBlockId($x, $y, $z, $b->getId());
}else{