Show tree support

This commit is contained in:
Frank 2022-07-28 20:10:43 +02:00
parent 2aa13a76ee
commit 30ecd31fab
2 changed files with 17 additions and 2 deletions

View file

@ -79,4 +79,9 @@ public class EMIAlloyingRecipe implements EmiRecipe {
// This includes being able to resolve recipe trees, favorite stacks with recipe context, and more // This includes being able to resolve recipe trees, favorite stacks with recipe context, and more
widgets.addSlot(output.get(0), 78, 0).recipeContext(this); widgets.addSlot(output.get(0), 78, 0).recipeContext(this);
} }
@Override
public boolean supportsRecipeTree() {
return true;
}
} }

View file

@ -27,8 +27,8 @@ public class EMIAnvilRecipe implements EmiRecipe {
public EMIAnvilRecipe(AnvilRecipe recipe, Item hammer) { public EMIAnvilRecipe(AnvilRecipe recipe, Item hammer) {
this.id = new ResourceLocation( this.id = new ResourceLocation(
recipe.getId().getNamespace(), "emi",
recipe.getId().getPath() + "_" + hammer.getDescriptionId() recipe.getId().getNamespace() + "/" + recipe.getId().getPath() + "/" + hammer.getDescriptionId()
); );
this.input = List.of( this.input = List.of(
EmiIngredient.of(recipe.getMainIngredient(), recipe.getInputCount()), EmiIngredient.of(recipe.getMainIngredient(), recipe.getInputCount()),
@ -92,4 +92,14 @@ public class EMIAnvilRecipe implements EmiRecipe {
// This includes being able to resolve recipe trees, favorite stacks with recipe context, and more // This includes being able to resolve recipe trees, favorite stacks with recipe context, and more
widgetHolder.addSlot(output.get(0), 78, 0).recipeContext(this); widgetHolder.addSlot(output.get(0), 78, 0).recipeContext(this);
} }
@Override
public List<EmiIngredient> getCatalysts() {
return List.of(input.get(1));
}
@Override
public boolean supportsRecipeTree() {
return true;
}
} }