Item: remove workaround for anvils

they removed this in the 1.2.13 release. now the metadata matches the block.
This commit is contained in:
Dylan K. Taylor 2018-05-23 11:43:55 +01:00
parent acf29711c2
commit 8f41384923
2 changed files with 0 additions and 40 deletions

View File

@ -1,38 +0,0 @@
<?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/
*
*
*/
declare(strict_types=1);
namespace pocketmine\item;
use pocketmine\block\Block;
use pocketmine\block\BlockFactory;
class Anvil extends ItemBlock{
public function __construct(int $meta = 0){
parent::__construct(Item::ANVIL, $meta);
}
public function getBlock() : Block{
return BlockFactory::get(Block::ANVIL, $this->meta << 2);
}
}

View File

@ -38,8 +38,6 @@ class ItemFactory{
public static function init(){
self::$list = new \SplFixedArray(65536);
self::registerItem(new Anvil(), true);
self::registerItem(new Shovel(Item::IRON_SHOVEL, 0, "Iron Shovel", TieredTool::TIER_IRON));
self::registerItem(new Pickaxe(Item::IRON_PICKAXE, 0, "Iron Pickaxe", TieredTool::TIER_IRON));
self::registerItem(new Axe(Item::IRON_AXE, 0, "Iron Axe", TieredTool::TIER_IRON));