
Note the 3 recipes on the expand menu. The first two use ItemStack ingredients, whereas the last one uses OreIngredient.
Forge 14.21.0.2322
~This should be fixed in the latest version, which also has the recipe json loading and recipe registries. I don't have any working ore recipe at the moment so I can't verify my claim, but the current implementation of OreIngredient#getMatchingStacks looks like it should work.~
Scratch that. The issue is that the OreDict returns ItemStacks with WILDCARD_VALUE as metadata, and the recipe book preview code does not have logic for expanding the wildcard into the list of subtypes.
@gigaherz @Vazkii Item#getSubItems and Block#getSubBlocks could, in theory, be used to expand the wildcards. The only problem is that those methods are client-only.
Isn't the recipe ~"placeholder"~ preview rendering client-side? Couldn't it expand the list of subitems?
(EDIT: I couldn't think of the right word till now)
Yeah theoretically the book shouldn't need changing at all, just the guibuttons
Can you retest this, I think if fixed it with https://github.com/MinecraftForge/MinecraftForge/commit/1c24600bbbe1c3f64dc3fddb1ca65afd029a0b40 and https://github.com/MinecraftForge/MinecraftForge/commit/efd8b38be9fe7ce4521a0dfbe660f3167aa27e9f
@LexManos It works for OreIngredient, but regular ingredients with a metadata of 32767 still have missing textures instead of looping through all sub items
For example, ImmersiveEngineering adds another recipe for the torch and it has this as one of its ingredients:
{
"item": "minecraft:wool",
"data": 32767
}
Which results in a missing texture
Vanilla Ingredients do not support wildcards for sub-items. This is a decision by mojang that they are adamant about.
I guess, but a lot of people are still putting the wildcard value in vanilla ingredients, which would then lead to having missing textures all over the place. Changing Ingredient#getMatchingStacks to check for the wildcard value would fix it (or sub items can even be calculated when the Ingredient instance is created)
What people DO and what they SHOULD do are quite often different things.
It is Mojang EXPLICIT intention and instructions that they are to explicitly list all subitems. Hence why it errors when you specify a subitem and no metadata.
Yes, we could make the Ingredient auto expand subitems but we won't.
I've actually spoken to the powers that be and they are adamant about keeping it this way so I'm respecting their wishes.
This issue has been automatically marked as stale because it has not had activity in a long time. If this issue is still relevant and should remain open, please reply with a short explanation (e.g. "I have checked the code and this issue is still relevant because ___." or "Here's a screenshot of this issue on the latest version"). Thank you for your contributions!
This issue has been automatically closed because it has not had activity in a long time. Please feel free to reopen it or create a new issue.