
tfc:quern recipies won't return ingredients
Closed this issue ยท 2 comments
On the KubeJS recipes event, there is a method named forEachRecipe which allows you to access the recipe ingredients and output of any crafting type. Ive tested it on minecraft:crafting_shaped and received a table, as expected however when trying it on tfc:quern the output will be available but the ingredients are consistently an empty table [].
Here's a code snippet to reproduce the issue
event.forEachRecipe({ type: 'tfc:quern' }, recipe => {
let ingredients = recipe.originalRecipeIngredients;
let output = recipe.originalRecipeResult;
console.log(ingredients)
});
This is due to TFC itself. By default, RecipeJS#getOriginalRecipeIngredients()
delegates to Recipe#getIngredients()
, which defaults to an empty list.
TFC's quern recipe is a SimpleItemRecipe
, itself a child of ISimpleRecipe
, a child of vanilla's Recipe
. Neither of those two recipes override #getIngredients()
to return the single input.
In the next update, I'll look over all of TFC's recipe types and override RecipeJS#getOriginalRecipeIngredients()
and RecipeJS#getOriginalRecipeResult()
as needed. Thanks for the report!