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:
@ -54,13 +54,13 @@ class DoubleStoneSlab extends Solid{
|
||||
6 => "Quartz",
|
||||
7 => "Nether Brick"
|
||||
];
|
||||
return "Double " . $names[$this->meta & 0x07] . " Slab";
|
||||
return "Double " . $names[$this->getVariant()] . " Slab";
|
||||
}
|
||||
|
||||
public function getDrops(Item $item) : array{
|
||||
if($item->isPickaxe() >= Tool::TIER_WOODEN){
|
||||
return [
|
||||
ItemFactory::get(Item::STONE_SLAB, $this->getDamage() & 0x07, 2)
|
||||
ItemFactory::get(Item::STONE_SLAB, $this->getVariant(), 2)
|
||||
];
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user