use of com.everlastsino.cate.recipe.recipes.CuttingRecipe in project SinoCate by EverlastSino.
the class CuttingBoardBlockEntity method matchRecipe.
public void matchRecipe() {
if (this.world == null || this.itemStack.isEmpty())
return;
Optional<CuttingRecipe> recipe = this.world.getRecipeManager().getFirstMatch(CateRecipes.Cutting_RecipeType, new SimpleInventory(this.itemStack), this.world);
if (recipe.isEmpty())
return;
CuttingRecipe newRecipe = recipe.get();
this.requireSteps = newRecipe.steps;
this.result = newRecipe.result.copy();
this.tool = newRecipe.tool.copy();
this.damageTool = newRecipe.damageTool;
this.step = 0;
this.matchedRecipe = true;
}
Aggregations