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.
This commit is contained in:
Dylan K. Taylor 2019-07-16 14:31:04 +01:00
parent 52de5a6e49
commit d624c38ab1
2 changed files with 0 additions and 45 deletions

View File

@ -51,21 +51,6 @@ use const PHP_INT_MAX;
class Block extends Position implements BlockLegacyIds{ 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 */ /** @var BlockIdentifier */
protected $idInfo; protected $idInfo;

View File

@ -58,36 +58,6 @@ class Item implements ItemIds, \JsonSerializable{
public const TAG_DISPLAY_NAME = "Name"; public const TAG_DISPLAY_NAME = "Name";
public const TAG_DISPLAY_LORE = "Lore"; 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 */ /** @var int */
protected $id; protected $id;
/** @var int */ /** @var int */