Ingredient.custom doesn't match anything in recipes (Forge)
ForgottenUmbrella opened this issue ยท 0 comments
Minecraft Version
1.19.2
KubeJS Version
1902.6.0-build.142
Rhino Version
1902.2.2-build.268
Architectury Version
6.5.77
Forge/Fabric Version
Forge 43.2.8
Describe your issue
I may be doing something wrong, but I can't seem to get Ingredient.custom
to match in any recipe.
For instance, take the following script placed in the server_scripts directory:
ServerEvents.recipes(event => {
event.shapeless(
'minecraft:grass_block',
[Ingredient.custom('minecraft:dirt', _ => true)]
)
})
(Note that the custom predicate is always true, to narrow down possible causes of the bug.)
I expect to be able to place a dirt block in a crafting grid and get a grass block as output. Instead, I see no output.
I also tried a shaped recipe, to see if the issue was specifically with shapeless recipes:
ServerEvents.recipes(event => {
event.shaped(
'minecraft:grass_block',
[
'D ',
' ',
' ',
],
{D: Ingredient.custom('minecraft:dirt', _ => true)}
)
})
I expect to be able to place a dirt block in the top left corner of the crafting table and get a grass block as output. Again, no luck.
Crash report/logs
No response