Leaf log search is type agnostic

any wood type will do
This commit is contained in:
Dylan K. Taylor 2018-09-19 08:47:03 +01:00
parent 01f12d6147
commit a80d5bb6a8
2 changed files with 2 additions and 3 deletions

View File

@ -40,7 +40,6 @@ class Leaves extends Transparent{
public const DARK_OAK = 1; public const DARK_OAK = 1;
protected $id = self::LEAVES; protected $id = self::LEAVES;
protected $woodType = self::WOOD;
public function __construct(int $meta = 0){ public function __construct(int $meta = 0){
$this->setDamage($meta); $this->setDamage($meta);
@ -76,7 +75,8 @@ class Leaves extends Transparent{
} }
$visited[$index] = true; $visited[$index] = true;
if($pos->getId() === $this->woodType){ $id = $pos->getId();
if($id === Block::WOOD or $id === Block::WOOD2){
return true; return true;
} }

View File

@ -29,7 +29,6 @@ use pocketmine\item\ItemFactory;
class Leaves2 extends Leaves{ class Leaves2 extends Leaves{
protected $id = self::LEAVES2; protected $id = self::LEAVES2;
protected $woodType = self::WOOD2;
public function getName() : string{ public function getName() : string{
static $names = [ static $names = [