Show tree support
This commit is contained in:
parent
2aa13a76ee
commit
30ecd31fab
2 changed files with 17 additions and 2 deletions
|
@ -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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue