Browse Source

Fixing Redefinition error #5

tags/1.0
Ad5001 2 years ago
parent
commit
220577e563

+ 1
- 1
src/Ad5001/BetterGen/populator/MineshaftPopulator.php View File

@@ -131,7 +131,7 @@ class MineshaftPopulator extends AmountPopulator {
$level->setBlockIdAt($v3->x, $v3->y, $v3->z, Block::PLANK);
}, $this->level);
// Putting rails
BuildingUtils::fillCallback(new Vector3($x, $y, $z ), new Vector3($x - 4, $y, $z ), function ($v3, $level, $level) {
BuildingUtils::fillCallback(new Vector3($x, $y, $z ), new Vector3($x - 4, $y, $z ), function ($v3, $level, $random) {
if ($random->nextBoundedInt(3 ) !== 0) {
$level->setBlockIdAt($v3->x, $v3->y, $v3->z, Block::RAIL);
$level->setBlockDataAt($v3->x, $v3->y, $v3->z, 1);

+ 6
- 1
src/Ad5001/BetterGen/structure/FallenTree.php View File

@@ -107,7 +107,12 @@ class FallenTree extends Object {
}
// Second call to build the last wood block
switch($this->direction) {

case 1:
$level->setBlockIdAt($x, $y, $z + $this->length + 2, $this->tree->trunkBlock);
break;
case 3:
$level->setBlockIdAt($x + $this->length + 2, $y, $z, $this->tree->trunkBlock);
break;
}
}

Loading…
Cancel
Save