From d624c38ab1faee568e768566619a19a724ad2803 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Tue, 16 Jul 2019 14:31:04 +0100 Subject: [PATCH] Remove dead proxy functions Item::get(), Block::get() and Item::fromString() with the introduction of the VanillaBlocks and VanillaItems API, it's expected that plugins will no longer need these methods. --- src/pocketmine/block/Block.php | 15 --------------- src/pocketmine/item/Item.php | 30 ------------------------------ 2 files changed, 45 deletions(-) diff --git a/src/pocketmine/block/Block.php b/src/pocketmine/block/Block.php index 13f4f43a2..f4882508a 100644 --- a/src/pocketmine/block/Block.php +++ b/src/pocketmine/block/Block.php @@ -51,21 +51,6 @@ use const PHP_INT_MAX; class Block extends Position implements BlockLegacyIds{ - /** - * Returns a new Block instance with the specified ID, meta and position. - * - * This function redirects to {@link BlockFactory#get}. - * - * @param int $id - * @param int $meta - * @param Position|null $pos - * - * @return Block - */ - public static function get(int $id, int $meta = 0, ?Position $pos = null) : Block{ - return BlockFactory::get($id, $meta, $pos); - } - /** @var BlockIdentifier */ protected $idInfo; diff --git a/src/pocketmine/item/Item.php b/src/pocketmine/item/Item.php index b7bd229ca..7c9ca6897 100644 --- a/src/pocketmine/item/Item.php +++ b/src/pocketmine/item/Item.php @@ -58,36 +58,6 @@ class Item implements ItemIds, \JsonSerializable{ public const TAG_DISPLAY_NAME = "Name"; public const TAG_DISPLAY_LORE = "Lore"; - /** - * Returns a new Item instance with the specified ID, damage, count and NBT. - * - * This function redirects to {@link ItemFactory#get}. - * - * @param int $id - * @param int $meta - * @param int $count - * @param CompoundTag $tags - * - * @return Item - */ - public static function get(int $id, int $meta = 0, int $count = 1, ?CompoundTag $tags = null) : Item{ - return ItemFactory::get($id, $meta, $count, $tags); - } - - /** - * Tries to parse the specified string into Item types. - * - * This function redirects to {@link ItemFactory#fromString}. - * - * @param string $str - * - * @return Item - * @throws \InvalidArgumentException - */ - public static function fromString(string $str) : Item{ - return ItemFactory::fromString($str); - } - /** @var int */ protected $id; /** @var int */