mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-12 16:59:44 +00:00
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:
parent
52de5a6e49
commit
d624c38ab1
@ -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;
|
||||
|
||||
|
@ -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 */
|
||||
|
Loading…
x
Reference in New Issue
Block a user