mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 09:56:06 +00:00
Added Normal and Big crafting recipes, fixed CraftingTransactionGroup count
This commit is contained in:
@ -91,6 +91,17 @@ class ShapelessRecipe implements Recipe{
|
||||
return $ingredients;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getIngredientCount(){
|
||||
$count = 0;
|
||||
foreach($this->ingredients as $ingredient){
|
||||
$count += $ingredient->getCount();
|
||||
}
|
||||
return $count;
|
||||
}
|
||||
|
||||
public function registerToCraftingManager(){
|
||||
Server::getInstance()->getCraftingManager()->registerShapelessRecipe($this);
|
||||
}
|
||||
|
Reference in New Issue
Block a user