@Override
protected void onIndexUpdate(int index, ICarpenterRecipe recipe) {
selectedElement.add(new TankElement(91, 1, null, () -> new FluidTankInfo(recipe.getFluidResource(), Constants.PROCESSOR_TANK_CAPACITY), CARPENTER_TANK_OVERLAY));
IDescriptiveRecipe gridRecipe = recipe.getCraftingGridRecipe();
NonNullList<NonNullList<ItemStack>> ingredients = gridRecipe.getRawIngredients();
for (int x = 0; x < 3; x++) {
for (int y = 0; y < 3; y++) {
int ingredientIndex = y * 3 + x;
if (ingredientIndex >= ingredients.size()) {
continue;
}
NonNullList<ItemStack> items = ingredients.get(ingredientIndex);
selectedElement.add(new IngredientElement(1 + x * 19, 3 + y * 19, Ingredient.fromStacks(items.toArray(new ItemStack[items.size()]))));
}
}
selectedElement.item(71, 41, gridRecipe.getOutput());
}
}