Added CraftItemEvent, Crafting system now uses Transactions

This commit is contained in:
Shoghi Cervantes
2014-05-27 17:49:22 +02:00
parent 3fc1be1262
commit 6746987ce5
14 changed files with 348 additions and 105 deletions

View File

@ -23,15 +23,24 @@ namespace pocketmine\block;
class Planks extends Solid{
const OAK = 0;
const SPRUCE = 1;
const BIRCH = 2;
const JUNGLE = 3;
const ACACIA = 4;
const DARK_OAK = 5;
public function __construct($meta = 0){
parent::__construct(self::PLANKS, $meta, "Wooden Planks");
parent::__construct(self::PLANKS, $meta, "Wood Planks");
$names = array(
Wood::OAK => "Oak Wooden Planks",
Wood::SPRUCE => "Spruce Wooden Planks",
Wood::BIRCH => "Birch Wooden Planks",
Wood::JUNGLE => "Jungle Wooden Planks",
self::OAK => "Oak Wood Planks",
self::SPRUCE => "Spruce Wood Planks",
self::BIRCH => "Birch Wood Planks",
self::JUNGLE => "Jungle Wood Planks",
self::ACACIA => "Acacia Wood Planks",
self::DARK_OAK => "Jungle Wood Planks",
);
$this->name = $names[$this->meta & 0x03];
$this->name = $names[$this->meta & 0x07];
$this->hardness = 15;
}