From a80d5bb6a87ca88df3eaf0fc64a7c73ca50aa946 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Wed, 19 Sep 2018 08:47:03 +0100 Subject: [PATCH] Leaf log search is type agnostic any wood type will do --- src/pocketmine/block/Leaves.php | 4 ++-- src/pocketmine/block/Leaves2.php | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/pocketmine/block/Leaves.php b/src/pocketmine/block/Leaves.php index 8ad5ae402..5d32a721d 100644 --- a/src/pocketmine/block/Leaves.php +++ b/src/pocketmine/block/Leaves.php @@ -40,7 +40,6 @@ class Leaves extends Transparent{ public const DARK_OAK = 1; protected $id = self::LEAVES; - protected $woodType = self::WOOD; public function __construct(int $meta = 0){ $this->setDamage($meta); @@ -76,7 +75,8 @@ class Leaves extends Transparent{ } $visited[$index] = true; - if($pos->getId() === $this->woodType){ + $id = $pos->getId(); + if($id === Block::WOOD or $id === Block::WOOD2){ return true; } diff --git a/src/pocketmine/block/Leaves2.php b/src/pocketmine/block/Leaves2.php index bd18ec7c2..3038e3319 100644 --- a/src/pocketmine/block/Leaves2.php +++ b/src/pocketmine/block/Leaves2.php @@ -29,7 +29,6 @@ use pocketmine\item\ItemFactory; class Leaves2 extends Leaves{ protected $id = self::LEAVES2; - protected $woodType = self::WOOD2; public function getName() : string{ static $names = [