Cleaned up some copy-pasted code for coloured blocks names

This commit is contained in:
Dylan K. Taylor
2017-08-16 14:38:41 +01:00
parent 8510be062c
commit 021dbd65d7
12 changed files with 72 additions and 92 deletions

View File

@ -49,11 +49,9 @@ class WoodenSlab extends Transparent{
2 => "Birch",
3 => "Jungle",
4 => "Acacia",
5 => "Dark Oak",
6 => "",
7 => ""
5 => "Dark Oak"
];
return (($this->meta & 0x08) === 0x08 ? "Upper " : "") . $names[$this->meta & 0x07] . " Wooden Slab";
return (($this->meta & 0x08) === 0x08 ? "Upper " : "") . ($names[$this->meta & 0x07] ?? "") . " Wooden Slab";
}
protected function recalculateBoundingBox(){