mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 10:53:05 +00:00
Use Block->getVariant() more, get rid of hardcoded bitmasks
This commit is contained in:
@ -36,11 +36,11 @@ class Leaves2 extends Leaves{
|
||||
self::ACACIA => "Acacia Leaves",
|
||||
self::DARK_OAK => "Dark Oak Leaves"
|
||||
];
|
||||
return $names[$this->meta & 0x03] ?? "Unknown";
|
||||
return $names[$this->getVariant()] ?? "Unknown";
|
||||
}
|
||||
|
||||
public function getDrops(Item $item) : array{
|
||||
$variantMeta = $this->getDamage() & 0x03;
|
||||
$variantMeta = $this->getVariant();
|
||||
|
||||
if($item->isShears()){
|
||||
return [
|
||||
|
Reference in New Issue
Block a user