Mark ItemFactory::get() and BlockFactory::get() as @deprecated

This commit is contained in:
Dylan K. Taylor 2021-04-16 21:16:27 +01:00
parent 81ced66bd0
commit 6071746993
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D
2 changed files with 10 additions and 2 deletions

View File

@ -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){

View File

@ -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
*/