mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-05 01:16:15 +00:00
Fixed missing variant bitmask for Leaves, close #1478
This commit is contained in:
@ -169,10 +169,14 @@ class Leaves extends Transparent{
|
|||||||
return $this->getLevel()->setBlock($this, $this, true);
|
return $this->getLevel()->setBlock($this, $this, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getVariantBitmask() : int{
|
||||||
|
return 0x03;
|
||||||
|
}
|
||||||
|
|
||||||
public function getDrops(Item $item) : array{
|
public function getDrops(Item $item) : array{
|
||||||
$drops = [];
|
$drops = [];
|
||||||
|
|
||||||
$variantMeta = $this->getDamage() & 0x03;
|
$variantMeta = $this->getVariant();
|
||||||
|
|
||||||
if($item->isShears()){
|
if($item->isShears()){
|
||||||
$drops[] = ItemFactory::get($this->getItemId(), $variantMeta, 1);
|
$drops[] = ItemFactory::get($this->getItemId(), $variantMeta, 1);
|
||||||
|
Reference in New Issue
Block a user