mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 08:44:01 +00:00
Mark ItemFactory::get() and BlockFactory::get() as @deprecated
This commit is contained in:
parent
81ced66bd0
commit
6071746993
@ -880,7 +880,11 @@ class BlockFactory{
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a new Block instance with the specified ID, meta and position.
|
||||
* @deprecated This method should ONLY be used for deserializing data, e.g. from a config or database. For all other
|
||||
* purposes, use VanillaBlocks.
|
||||
* @see VanillaBlocks
|
||||
*
|
||||
* Deserializes a block from the provided legacy ID and legacy meta.
|
||||
*/
|
||||
public function get(int $id, int $meta) : Block{
|
||||
if($meta < 0 or $meta > 0xf){
|
||||
|
@ -424,7 +424,11 @@ class ItemFactory{
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an instance of the Item with the specified id, meta, count and NBT.
|
||||
* @deprecated This method should ONLY be used for deserializing data, e.g. from a config or database. For all other
|
||||
* purposes, use VanillaItems.
|
||||
* @see VanillaItems
|
||||
*
|
||||
* Deserializes an item from the provided legacy ID, legacy meta, count and NBT.
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user