Use Block->getVariant() more, get rid of hardcoded bitmasks

This commit is contained in:
Dylan K. Taylor
2017-10-18 17:46:24 +01:00
parent 91d84aaff4
commit f148c366f9
17 changed files with 36 additions and 38 deletions

View File

@ -55,7 +55,7 @@ class StoneSlab extends WoodenSlab{
self::QUARTZ => "Quartz",
self::NETHER_BRICK => "Nether Brick"
];
return (($this->meta & 0x08) > 0 ? "Upper " : "") . $names[$this->meta & 0x07] . " Slab";
return (($this->meta & 0x08) > 0 ? "Upper " : "") . ($names[$this->getVariant()] ?? "") . " Slab";
}
public function getToolType() : int{