mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-11 22:15:30 +00:00
GroundCover: don't replace liquid with can-be-flowed-into blocks
fixes snow layers generating underwater
This commit is contained in:
parent
78ec3937bf
commit
8cd311bcb4
@ -24,6 +24,7 @@ declare(strict_types=1);
|
|||||||
namespace pocketmine\level\generator\populator;
|
namespace pocketmine\level\generator\populator;
|
||||||
|
|
||||||
use pocketmine\block\BlockFactory;
|
use pocketmine\block\BlockFactory;
|
||||||
|
use pocketmine\block\Liquid;
|
||||||
use pocketmine\level\biome\Biome;
|
use pocketmine\level\biome\Biome;
|
||||||
use pocketmine\level\ChunkManager;
|
use pocketmine\level\ChunkManager;
|
||||||
use pocketmine\utils\Random;
|
use pocketmine\utils\Random;
|
||||||
@ -55,6 +56,9 @@ class GroundCover extends Populator{
|
|||||||
if($column{$y} === "\x00" and $b->isSolid()){
|
if($column{$y} === "\x00" and $b->isSolid()){
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
if($b->canBeFlowedInto() and BlockFactory::get(ord($column{$y})) instanceof Liquid){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if($b->getDamage() === 0){
|
if($b->getDamage() === 0){
|
||||||
$chunk->setBlockId($x, $y, $z, $b->getId());
|
$chunk->setBlockId($x, $y, $z, $b->getId());
|
||||||
}else{
|
}else{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user