mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-13 09:19:42 +00:00
Leaf log search is type agnostic
any wood type will do
This commit is contained in:
parent
01f12d6147
commit
a80d5bb6a8
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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 = [
|
||||
|
Loading…
x
Reference in New Issue
Block a user