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

@ -46,10 +46,9 @@ class Sandstone extends Solid{
static $names = [
self::NORMAL => "Sandstone",
self::CHISELED => "Chiseled Sandstone",
self::SMOOTH => "Smooth Sandstone",
3 => "",
self::SMOOTH => "Smooth Sandstone"
];
return $names[$this->meta & 0x03];
return $names[$this->meta & 0x03] ?? "Unknown";
}
public function getToolType(){