From 220577e563da6bb30479c9d48148ce9e71606289 Mon Sep 17 00:00:00 2001 From: Ad5001 Date: Fri, 5 May 2017 10:00:48 +0200 Subject: [PATCH] Fixing Redefinition error #5 --- src/Ad5001/BetterGen/populator/MineshaftPopulator.php | 2 +- src/Ad5001/BetterGen/structure/FallenTree.php | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Ad5001/BetterGen/populator/MineshaftPopulator.php b/src/Ad5001/BetterGen/populator/MineshaftPopulator.php index 86f1c3b..99d1dcd 100644 --- a/src/Ad5001/BetterGen/populator/MineshaftPopulator.php +++ b/src/Ad5001/BetterGen/populator/MineshaftPopulator.php @@ -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); diff --git a/src/Ad5001/BetterGen/structure/FallenTree.php b/src/Ad5001/BetterGen/structure/FallenTree.php index 3184c96..7670f03 100644 --- a/src/Ad5001/BetterGen/structure/FallenTree.php +++ b/src/Ad5001/BetterGen/structure/FallenTree.php @@ -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; } }