mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-11 08:19:45 +00:00
crafting: deprecate some stuff that's been removed on bleeding edge
This commit is contained in:
parent
ac5339414a
commit
4d54dc30c1
@ -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{
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -25,5 +25,10 @@ namespace pocketmine\inventory;
|
||||
|
||||
interface Recipe{
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
*
|
||||
* @param CraftingManager $manager
|
||||
*/
|
||||
public function registerToCraftingManager(CraftingManager $manager) : void;
|
||||
}
|
||||
|
@ -187,6 +187,11 @@ class ShapedRecipe implements CraftingRecipe{
|
||||
return $this->shape;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
*
|
||||
* @param CraftingManager $manager
|
||||
*/
|
||||
public function registerToCraftingManager(CraftingManager $manager) : void{
|
||||
$manager->registerShapedRecipe($this);
|
||||
}
|
||||
|
@ -111,6 +111,11 @@ class ShapelessRecipe implements CraftingRecipe{
|
||||
return $count;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
*
|
||||
* @param CraftingManager $manager
|
||||
*/
|
||||
public function registerToCraftingManager(CraftingManager $manager) : void{
|
||||
$manager->registerShapelessRecipe($this);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user