Added armor items and max stack size for them.

This commit is contained in:
Shoghi Cervantes 2014-12-04 00:04:09 +01:00
parent 1963d8fde0
commit 294e680d5d
23 changed files with 685 additions and 55 deletions

View File

@ -2182,7 +2182,7 @@ class Player extends Human implements CommandSender, InventoryHolder, IPlayer{
}
if($this->currentTransaction === null or $this->currentTransaction->getCreationTime() < (microtime(true) - 0.4)){
if($this->currentTransaction === null or $this->currentTransaction->getCreationTime() < (microtime(true) - 0.5)){
if($this->currentTransaction instanceof SimpleTransactionGroup){
foreach($this->currentTransaction->getInventories() as $inventory){
if($inventory instanceof PlayerInventory){

View File

@ -0,0 +1,31 @@
<?php
/*
*
* ____ _ _ __ __ _ __ __ ____
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* @author PocketMine Team
* @link http://www.pocketmine.net/
*
*
*/
namespace pocketmine\item;
use pocketmine\block\Block;
use pocketmine\entity\Entity;
abstract class Armor extends Item{
public $maxStackSize = 1;
}

View File

@ -0,0 +1,29 @@
<?php
/*
*
* ____ _ _ __ __ _ __ __ ____
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* @author PocketMine Team
* @link http://www.pocketmine.net/
*
*
*/
namespace pocketmine\item;
class ChainBoots extends Armor{
public function __construct($meta = 0, $count = 1){
parent::__construct(self::CHAIN_BOOTS, $meta, $count, "Chainmail Boots");
}
}

View File

@ -0,0 +1,29 @@
<?php
/*
*
* ____ _ _ __ __ _ __ __ ____
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* @author PocketMine Team
* @link http://www.pocketmine.net/
*
*
*/
namespace pocketmine\item;
class ChainChestplate extends Armor{
public function __construct($meta = 0, $count = 1){
parent::__construct(self::CHAIN_CHESTPLATE, $meta, $count, "Chain Chestplate");
}
}

View File

@ -0,0 +1,29 @@
<?php
/*
*
* ____ _ _ __ __ _ __ __ ____
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* @author PocketMine Team
* @link http://www.pocketmine.net/
*
*
*/
namespace pocketmine\item;
class ChainHelmet extends Armor{
public function __construct($meta = 0, $count = 1){
parent::__construct(self::CHAIN_HELMET, $meta, $count, "Chainmail Helmet");
}
}

View File

@ -0,0 +1,29 @@
<?php
/*
*
* ____ _ _ __ __ _ __ __ ____
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* @author PocketMine Team
* @link http://www.pocketmine.net/
*
*
*/
namespace pocketmine\item;
class ChainLeggings extends Armor{
public function __construct($meta = 0, $count = 1){
parent::__construct(self::CHAIN_LEGGINGS, $meta, $count, "Chain Leggings");
}
}

View File

@ -0,0 +1,29 @@
<?php
/*
*
* ____ _ _ __ __ _ __ __ ____
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* @author PocketMine Team
* @link http://www.pocketmine.net/
*
*
*/
namespace pocketmine\item;
class DiamondBoots extends Armor{
public function __construct($meta = 0, $count = 1){
parent::__construct(self::DIAMOND_BOOTS, $meta, $count, "Diamond Boots");
}
}

View File

@ -0,0 +1,29 @@
<?php
/*
*
* ____ _ _ __ __ _ __ __ ____
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* @author PocketMine Team
* @link http://www.pocketmine.net/
*
*
*/
namespace pocketmine\item;
class DiamondChestplate extends Armor{
public function __construct($meta = 0, $count = 1){
parent::__construct(self::DIAMOND_CHESTPLATE, $meta, $count, "Diamond Chestplate");
}
}

View File

@ -0,0 +1,29 @@
<?php
/*
*
* ____ _ _ __ __ _ __ __ ____
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* @author PocketMine Team
* @link http://www.pocketmine.net/
*
*
*/
namespace pocketmine\item;
class DiamondHelmet extends Armor{
public function __construct($meta = 0, $count = 1){
parent::__construct(self::DIAMOND_HELMET, $meta, $count, "Diamond Helmet");
}
}

View File

@ -0,0 +1,29 @@
<?php
/*
*
* ____ _ _ __ __ _ __ __ ____
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* @author PocketMine Team
* @link http://www.pocketmine.net/
*
*
*/
namespace pocketmine\item;
class DiamondLeggings extends Armor{
public function __construct($meta = 0, $count = 1){
parent::__construct(self::DIAMOND_LEGGINGS, $meta, $count, "Diamond Leggings");
}
}

View File

@ -0,0 +1,29 @@
<?php
/*
*
* ____ _ _ __ __ _ __ __ ____
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* @author PocketMine Team
* @link http://www.pocketmine.net/
*
*
*/
namespace pocketmine\item;
class GoldBoots extends Armor{
public function __construct($meta = 0, $count = 1){
parent::__construct(self::GOLD_BOOTS, $meta, $count, "Gold Boots");
}
}

View File

@ -0,0 +1,29 @@
<?php
/*
*
* ____ _ _ __ __ _ __ __ ____
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* @author PocketMine Team
* @link http://www.pocketmine.net/
*
*
*/
namespace pocketmine\item;
class GoldChestplate extends Armor{
public function __construct($meta = 0, $count = 1){
parent::__construct(self::GOLD_CHESTPLATE, $meta, $count, "Gold Chestplate");
}
}

View File

@ -0,0 +1,29 @@
<?php
/*
*
* ____ _ _ __ __ _ __ __ ____
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* @author PocketMine Team
* @link http://www.pocketmine.net/
*
*
*/
namespace pocketmine\item;
class GoldHelmet extends Armor{
public function __construct($meta = 0, $count = 1){
parent::__construct(self::GOLD_HELMET, $meta, $count, "Gold Helmet");
}
}

View File

@ -0,0 +1,29 @@
<?php
/*
*
* ____ _ _ __ __ _ __ __ ____
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* @author PocketMine Team
* @link http://www.pocketmine.net/
*
*
*/
namespace pocketmine\item;
class GoldLeggings extends Armor{
public function __construct($meta = 0, $count = 1){
parent::__construct(self::GOLD_LEGGINGS, $meta, $count, "Gold Leggings");
}
}

View File

@ -0,0 +1,29 @@
<?php
/*
*
* ____ _ _ __ __ _ __ __ ____
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* @author PocketMine Team
* @link http://www.pocketmine.net/
*
*
*/
namespace pocketmine\item;
class IronBoots extends Armor{
public function __construct($meta = 0, $count = 1){
parent::__construct(self::IRON_BOOTS, $meta, $count, "Iron Boots");
}
}

View File

@ -0,0 +1,29 @@
<?php
/*
*
* ____ _ _ __ __ _ __ __ ____
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* @author PocketMine Team
* @link http://www.pocketmine.net/
*
*
*/
namespace pocketmine\item;
class IronChestplate extends Armor{
public function __construct($meta = 0, $count = 1){
parent::__construct(self::IRON_CHESTPLATE, $meta, $count, "Iron Chestplate");
}
}

View File

@ -0,0 +1,29 @@
<?php
/*
*
* ____ _ _ __ __ _ __ __ ____
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* @author PocketMine Team
* @link http://www.pocketmine.net/
*
*
*/
namespace pocketmine\item;
class IronHelmet extends Armor{
public function __construct($meta = 0, $count = 1){
parent::__construct(self::IRON_HELMET, $meta, $count, "Iron Helmet");
}
}

View File

@ -0,0 +1,29 @@
<?php
/*
*
* ____ _ _ __ __ _ __ __ ____
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* @author PocketMine Team
* @link http://www.pocketmine.net/
*
*
*/
namespace pocketmine\item;
class IronLeggings extends Armor{
public function __construct($meta = 0, $count = 1){
parent::__construct(self::IRON_LEGGINGS, $meta, $count, "Iron Leggings");
}
}

View File

@ -404,60 +404,79 @@ class Item{
public static function init(){
if(self::$list === null){
self::$list = new \SplFixedArray(65536);
self::$list[self::SUGARCANE] = Sugarcane::class;;
self::$list[self::WHEAT_SEEDS] = WheatSeeds::class;;
self::$list[self::PUMPKIN_SEEDS] = PumpkinSeeds::class;;
self::$list[self::MELON_SEEDS] = MelonSeeds::class;;
self::$list[self::MUSHROOM_STEW] = MushroomStew::class;;
self::$list[self::BEETROOT_SOUP] = BeetrootSoup::class;;
self::$list[self::CARROT] = Carrot::class;;
self::$list[self::POTATO] = Potato::class;;
self::$list[self::BEETROOT_SEEDS] = BeetrootSeeds::class;;
self::$list[self::SIGN] = Sign::class;;
self::$list[self::WOODEN_DOOR] = WoodenDoor::class;;
self::$list[self::BUCKET] = Bucket::class;;
self::$list[self::IRON_DOOR] = IronDoor::class;;
self::$list[self::CAKE] = Cake::class;;
self::$list[self::BED] = Bed::class;;
self::$list[self::PAINTING] = Painting::class;;
self::$list[self::COAL] = Coal::class;;
self::$list[self::APPLE] = Apple::class;;
self::$list[self::SPAWN_EGG] = SpawnEgg::class;;
self::$list[self::DIAMOND] = Diamond::class;;
self::$list[self::STICK] = Stick::class;;
self::$list[self::BOWL] = Bowl::class;;
self::$list[self::FEATHER] = Feather::class;;
self::$list[self::BRICK] = Brick::class;;
self::$list[self::IRON_SWORD] = IronSword::class;;
self::$list[self::IRON_INGOT] = IronIngot::class;;
self::$list[self::GOLD_INGOT] = GoldIngot::class;;
self::$list[self::IRON_SHOVEL] = IronShovel::class;;
self::$list[self::IRON_PICKAXE] = IronPickaxe::class;;
self::$list[self::IRON_AXE] = IronAxe::class;;
self::$list[self::IRON_HOE] = IronHoe::class;;
self::$list[self::DIAMOND_SWORD] = DiamondSword::class;;
self::$list[self::DIAMOND_SHOVEL] = DiamondShovel::class;;
self::$list[self::DIAMOND_PICKAXE] = DiamondPickaxe::class;;
self::$list[self::DIAMOND_AXE] = DiamondAxe::class;;
self::$list[self::DIAMOND_HOE] = DiamondHoe::class;;
self::$list[self::GOLD_SWORD] = GoldSword::class;;
self::$list[self::GOLD_SHOVEL] = GoldShovel::class;;
self::$list[self::GOLD_PICKAXE] = GoldPickaxe::class;;
self::$list[self::GOLD_AXE] = GoldAxe::class;;
self::$list[self::GOLD_HOE] = GoldHoe::class;;
self::$list[self::STONE_SWORD] = StoneSword::class;;
self::$list[self::STONE_SHOVEL] = StoneShovel::class;;
self::$list[self::STONE_PICKAXE] = StonePickaxe::class;;
self::$list[self::STONE_AXE] = StoneAxe::class;;
self::$list[self::STONE_HOE] = StoneHoe::class;;
self::$list[self::WOODEN_SWORD] = WoodenSword::class;;
self::$list[self::WOODEN_SHOVEL] = WoodenShovel::class;;
self::$list[self::WOODEN_PICKAXE] = WoodenPickaxe::class;;
self::$list[self::WOODEN_AXE] = WoodenAxe::class;;
self::$list[self::WOODEN_HOE] = WoodenHoe::class;;
self::$list[self::FLINT_STEEL] = FlintSteel::class;;
self::$list[self::SHEARS] = Shears::class;;
self::$list[self::BOW] = Bow::class;;
self::$list[self::SUGARCANE] = Sugarcane::class;
self::$list[self::WHEAT_SEEDS] = WheatSeeds::class;
self::$list[self::PUMPKIN_SEEDS] = PumpkinSeeds::class;
self::$list[self::MELON_SEEDS] = MelonSeeds::class;
self::$list[self::MUSHROOM_STEW] = MushroomStew::class;
self::$list[self::BEETROOT_SOUP] = BeetrootSoup::class;
self::$list[self::CARROT] = Carrot::class;
self::$list[self::POTATO] = Potato::class;
self::$list[self::BEETROOT_SEEDS] = BeetrootSeeds::class;
self::$list[self::SIGN] = Sign::class;
self::$list[self::WOODEN_DOOR] = WoodenDoor::class;
self::$list[self::BUCKET] = Bucket::class;
self::$list[self::IRON_DOOR] = IronDoor::class;
self::$list[self::CAKE] = Cake::class;
self::$list[self::BED] = Bed::class;
self::$list[self::PAINTING] = Painting::class;
self::$list[self::COAL] = Coal::class;
self::$list[self::APPLE] = Apple::class;
self::$list[self::SPAWN_EGG] = SpawnEgg::class;
self::$list[self::DIAMOND] = Diamond::class;
self::$list[self::STICK] = Stick::class;
self::$list[self::BOWL] = Bowl::class;
self::$list[self::FEATHER] = Feather::class;
self::$list[self::BRICK] = Brick::class;
self::$list[self::LEATHER_CAP] = LeatherCap::class;
self::$list[self::LEATHER_TUNIC] = LeatherTunic::class;
self::$list[self::LEATHER_PANTS] = LeatherPants::class;
self::$list[self::CHAIN_HELMET] = ChainHelmet::class;
self::$list[self::CHAIN_CHESTPLATE] = ChainChestplate::class;
self::$list[self::CHAIN_LEGGINGS] = ChainLeggings::class;
self::$list[self::CHAIN_BOOTS] = ChainBoots::class;
self::$list[self::IRON_HELMET] = IronHelmet::class;
self::$list[self::IRON_CHESTPLATE] = IronChestplate::class;
self::$list[self::IRON_LEGGINGS] = IronLeggings::class;
self::$list[self::IRON_BOOTS] = IronBoots::class;
self::$list[self::GOLD_HELMET] = GoldHelmet::class;
self::$list[self::GOLD_CHESTPLATE] = GoldChestplate::class;
self::$list[self::GOLD_LEGGINGS] = GoldLeggings::class;
self::$list[self::GOLD_BOOTS] = GoldBoots::class;
self::$list[self::DIAMOND_HELMET] = DiamondHelmet::class;
self::$list[self::DIAMOND_CHESTPLATE] = DiamondChestplate::class;
self::$list[self::DIAMOND_LEGGINGS] = DiamondLeggings::class;
self::$list[self::DIAMOND_BOOTS] = DiamondBoots::class;
self::$list[self::IRON_SWORD] = IronSword::class;
self::$list[self::IRON_INGOT] = IronIngot::class;
self::$list[self::GOLD_INGOT] = GoldIngot::class;
self::$list[self::IRON_SHOVEL] = IronShovel::class;
self::$list[self::IRON_PICKAXE] = IronPickaxe::class;
self::$list[self::IRON_AXE] = IronAxe::class;
self::$list[self::IRON_HOE] = IronHoe::class;
self::$list[self::DIAMOND_SWORD] = DiamondSword::class;
self::$list[self::DIAMOND_SHOVEL] = DiamondShovel::class;
self::$list[self::DIAMOND_PICKAXE] = DiamondPickaxe::class;
self::$list[self::DIAMOND_AXE] = DiamondAxe::class;
self::$list[self::DIAMOND_HOE] = DiamondHoe::class;
self::$list[self::GOLD_SWORD] = GoldSword::class;
self::$list[self::GOLD_SHOVEL] = GoldShovel::class;
self::$list[self::GOLD_PICKAXE] = GoldPickaxe::class;
self::$list[self::GOLD_AXE] = GoldAxe::class;
self::$list[self::GOLD_HOE] = GoldHoe::class;
self::$list[self::STONE_SWORD] = StoneSword::class;
self::$list[self::STONE_SHOVEL] = StoneShovel::class;
self::$list[self::STONE_PICKAXE] = StonePickaxe::class;
self::$list[self::STONE_AXE] = StoneAxe::class;
self::$list[self::STONE_HOE] = StoneHoe::class;
self::$list[self::WOODEN_SWORD] = WoodenSword::class;
self::$list[self::WOODEN_SHOVEL] = WoodenShovel::class;
self::$list[self::WOODEN_PICKAXE] = WoodenPickaxe::class;
self::$list[self::WOODEN_AXE] = WoodenAxe::class;
self::$list[self::WOODEN_HOE] = WoodenHoe::class;
self::$list[self::FLINT_STEEL] = FlintSteel::class;
self::$list[self::SHEARS] = Shears::class;
self::$list[self::BOW] = Bow::class;
for($i = 0; $i < 256; ++$i){
if(Block::$list[$i] !== null){

View File

@ -0,0 +1,29 @@
<?php
/*
*
* ____ _ _ __ __ _ __ __ ____
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* @author PocketMine Team
* @link http://www.pocketmine.net/
*
*
*/
namespace pocketmine\item;
class LeatherBoots extends Armor{
public function __construct($meta = 0, $count = 1){
parent::__construct(self::LEATHER_BOOTS, $meta, $count, "Leather Boots");
}
}

View File

@ -0,0 +1,29 @@
<?php
/*
*
* ____ _ _ __ __ _ __ __ ____
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* @author PocketMine Team
* @link http://www.pocketmine.net/
*
*
*/
namespace pocketmine\item;
class LeatherCap extends Armor{
public function __construct($meta = 0, $count = 1){
parent::__construct(self::LEATHER_CAP, $meta, $count, "Leather Cap");
}
}

View File

@ -0,0 +1,29 @@
<?php
/*
*
* ____ _ _ __ __ _ __ __ ____
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* @author PocketMine Team
* @link http://www.pocketmine.net/
*
*
*/
namespace pocketmine\item;
class LeatherPants extends Armor{
public function __construct($meta = 0, $count = 1){
parent::__construct(self::LEATHER_PANTS, $meta, $count, "Leather Pants");
}
}

View File

@ -0,0 +1,29 @@
<?php
/*
*
* ____ _ _ __ __ _ __ __ ____
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* @author PocketMine Team
* @link http://www.pocketmine.net/
*
*
*/
namespace pocketmine\item;
class LeatherTunic extends Armor{
public function __construct($meta = 0, $count = 1){
parent::__construct(self::LEATHER_TUNIC, $meta, $count, "Leather Tunic");
}
}