Fixing Redefinition error #5

This commit is contained in:
Adsooi 2017-05-05 10:00:48 +02:00
parent 7b4b4e1d63
commit 220577e563
2 changed files with 7 additions and 2 deletions

View file

@ -131,7 +131,7 @@ class MineshaftPopulator extends AmountPopulator {
$level->setBlockIdAt($v3->x, $v3->y, $v3->z, Block::PLANK); $level->setBlockIdAt($v3->x, $v3->y, $v3->z, Block::PLANK);
}, $this->level); }, $this->level);
// Putting rails // 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) { if ($random->nextBoundedInt(3 ) !== 0) {
$level->setBlockIdAt($v3->x, $v3->y, $v3->z, Block::RAIL); $level->setBlockIdAt($v3->x, $v3->y, $v3->z, Block::RAIL);
$level->setBlockDataAt($v3->x, $v3->y, $v3->z, 1); $level->setBlockDataAt($v3->x, $v3->y, $v3->z, 1);

View file

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