phpdoc armageddon for master, pass 1

This commit is contained in:
Dylan K. Taylor
2020-01-22 11:55:03 +00:00
parent 4bae3baa74
commit 67bcc1c0fb
397 changed files with 0 additions and 5391 deletions

View File

@ -124,8 +124,6 @@ class CraftingManager{
/**
* Returns a pre-compressed CraftingDataPacket for sending to players. Rebuilds the cache if it is not found.
*
* @return CompressBatchPromise
*/
public function getCraftingDataPacket() : CompressBatchPromise{
if($this->craftingDataCache === null){
@ -137,11 +135,6 @@ class CraftingManager{
/**
* Function used to arrange Shapeless Recipe ingredient lists into a consistent order.
*
* @param Item $i1
* @param Item $i2
*
* @return int
*/
public static function sort(Item $i1, Item $i2) : int{
//Use spaceship operator to compare each property, then try the next one if they are equivalent.
@ -206,27 +199,18 @@ class CraftingManager{
return $this->furnaceRecipes;
}
/**
* @param ShapedRecipe $recipe
*/
public function registerShapedRecipe(ShapedRecipe $recipe) : void{
$this->shapedRecipes[self::hashOutputs($recipe->getResults())][] = $recipe;
$this->craftingDataCache = null;
}
/**
* @param ShapelessRecipe $recipe
*/
public function registerShapelessRecipe(ShapelessRecipe $recipe) : void{
$this->shapelessRecipes[self::hashOutputs($recipe->getResults())][] = $recipe;
$this->craftingDataCache = null;
}
/**
* @param FurnaceRecipe $recipe
*/
public function registerFurnaceRecipe(FurnaceRecipe $recipe) : void{
$input = $recipe->getInput();
$this->furnaceRecipes[$input->getId() . ":" . ($input->hasAnyDamageValue() ? "?" : $input->getMeta())] = $recipe;
@ -234,10 +218,7 @@ class CraftingManager{
}
/**
* @param CraftingGrid $grid
* @param Item[] $outputs
*
* @return CraftingRecipe|null
*/
public function matchRecipe(CraftingGrid $grid, array $outputs) : ?CraftingRecipe{
//TODO: try to match special recipes before anything else (first they need to be implemented!)
@ -286,11 +267,6 @@ class CraftingManager{
}
}
/**
* @param Item $input
*
* @return FurnaceRecipe|null
*/
public function matchFurnaceRecipe(Item $input) : ?FurnaceRecipe{
return $this->furnaceRecipes[$input->getId() . ":" . $input->getMeta()] ?? $this->furnaceRecipes[$input->getId() . ":?"] ?? null;
}