Updating blocks and items

Added new blocks/items and added constants to existing blocks/items for
clearer recipe making.
This commit is contained in:
willowmaster66
2015-09-18 22:17:24 +02:00
parent cd6afb2020
commit a3bce67d35
11 changed files with 171 additions and 37 deletions

View File

@ -27,6 +27,14 @@ use pocketmine\math\AxisAlignedBB;
use pocketmine\Player;
class Slab extends Transparent{
const STONE = 0;
const SANDSTONE = 1;
const WOODEN = 2;
const COBBLESTONE = 3;
const BRICK = 4;
const STONE_BRICK = 5;
const QUARTZ = 6;
const NETHER_BRICK = 7;
protected $id = self::SLAB;
@ -40,14 +48,14 @@ class Slab extends Transparent{
public function getName(){
static $names = [
0 => "Stone",
1 => "Sandstone",
2 => "Wooden",
3 => "Cobblestone",
4 => "Brick",
5 => "Stone Brick",
6 => "Quartz",
7 => "",
self::STONE => "Stone",
self::SANDSTONE => "Sandstone",
self::WOODEN => "Wooden",
self::COBBLESTONE => "Cobblestone",
self::BRICK => "Brick",
self::STONE_BRICK => "Stone Brick",
self::QUARTZ => "Quartz",
self::NETHER_BRICK => "Nether Brick",
];
return (($this->meta & 0x08) > 0 ? "Upper " : "") . $names[$this->meta & 0x07] . " Slab";
}