diff --git a/src/pocketmine/inventory/CraftingManager.php b/src/pocketmine/inventory/CraftingManager.php index 528b364a9..33dba506f 100644 --- a/src/pocketmine/inventory/CraftingManager.php +++ b/src/pocketmine/inventory/CraftingManager.php @@ -60,7 +60,7 @@ class CraftingManager{ if($recipe["block"] !== "crafting_table"){ //TODO: filter others out for now to avoid breaking economics break; } - $this->registerRecipe(new ShapelessRecipe( + $this->registerShapelessRecipe(new ShapelessRecipe( array_map($itemDeserializerFunc, $recipe["input"]), array_map($itemDeserializerFunc, $recipe["output"]) )); @@ -69,7 +69,7 @@ class CraftingManager{ if($recipe["block"] !== "crafting_table"){ //TODO: filter others out for now to avoid breaking economics break; } - $this->registerRecipe(new ShapedRecipe( + $this->registerShapedRecipe(new ShapedRecipe( $recipe["shape"], array_map($itemDeserializerFunc, $recipe["input"]), array_map($itemDeserializerFunc, $recipe["output"]) @@ -79,7 +79,7 @@ class CraftingManager{ if($recipe["block"] !== "furnace"){ //TODO: filter others out for now to avoid breaking economics break; } - $this->registerRecipe(new FurnaceRecipe( + $this->registerFurnaceRecipe(new FurnaceRecipe( Item::jsonDeserialize($recipe["output"]), Item::jsonDeserialize($recipe["input"])) ); @@ -300,6 +300,8 @@ class CraftingManager{ } /** + * @deprecated + * * @param Recipe $recipe */ public function registerRecipe(Recipe $recipe) : void{ diff --git a/src/pocketmine/inventory/FurnaceRecipe.php b/src/pocketmine/inventory/FurnaceRecipe.php index c8ed4be61..8e81fe03f 100644 --- a/src/pocketmine/inventory/FurnaceRecipe.php +++ b/src/pocketmine/inventory/FurnaceRecipe.php @@ -63,6 +63,11 @@ class FurnaceRecipe implements Recipe{ return clone $this->output; } + /** + * @deprecated + * + * @param CraftingManager $manager + */ public function registerToCraftingManager(CraftingManager $manager) : void{ $manager->registerFurnaceRecipe($this); } diff --git a/src/pocketmine/inventory/Recipe.php b/src/pocketmine/inventory/Recipe.php index 883eea6d9..bdd72e01f 100644 --- a/src/pocketmine/inventory/Recipe.php +++ b/src/pocketmine/inventory/Recipe.php @@ -25,5 +25,10 @@ namespace pocketmine\inventory; interface Recipe{ + /** + * @deprecated + * + * @param CraftingManager $manager + */ public function registerToCraftingManager(CraftingManager $manager) : void; } diff --git a/src/pocketmine/inventory/ShapedRecipe.php b/src/pocketmine/inventory/ShapedRecipe.php index 04103cbfb..434eb36d5 100644 --- a/src/pocketmine/inventory/ShapedRecipe.php +++ b/src/pocketmine/inventory/ShapedRecipe.php @@ -187,6 +187,11 @@ class ShapedRecipe implements CraftingRecipe{ return $this->shape; } + /** + * @deprecated + * + * @param CraftingManager $manager + */ public function registerToCraftingManager(CraftingManager $manager) : void{ $manager->registerShapedRecipe($this); } diff --git a/src/pocketmine/inventory/ShapelessRecipe.php b/src/pocketmine/inventory/ShapelessRecipe.php index fcf303d43..170faab54 100644 --- a/src/pocketmine/inventory/ShapelessRecipe.php +++ b/src/pocketmine/inventory/ShapelessRecipe.php @@ -111,6 +111,11 @@ class ShapelessRecipe implements CraftingRecipe{ return $count; } + /** + * @deprecated + * + * @param CraftingManager $manager + */ public function registerToCraftingManager(CraftingManager $manager) : void{ $manager->registerShapelessRecipe($this); }