Some structure fixes

This commit is contained in:
ArkQuark 2023-03-04 22:44:32 +03:00
parent 1a383de853
commit a07a3ed486
3 changed files with 14 additions and 9 deletions

View file

@ -36,8 +36,8 @@ class SmallFarmStructure extends Structure{
" " => 0,
"D" => DIRT
];
protected function getFinalStructure(Level $level, $x, $y, $z)
{
protected function getFinalStructure(Level $level, $x, $y, $z){
if(!$level->getBlockWithoutVector($x, $y - 1, $z)->isSolid){
$structCopy = $this->structure;
$structCopy[-1] = array_fill(0, $this->length, str_repeat("D", $this->width)); //TODO sand or clay, check for the whole row of water?
@ -46,7 +46,6 @@ class SmallFarmStructure extends Structure{
return parent::getFinalStructure($level, $x, $y, $z);
}
protected function getMappingFor($char){
if($char === "R"){
$f = Utils::randomFloat();