Custom Ingredients do not work
ChiefArug opened this issue ยท 2 comments
Minecraft Version
1.19.2
KubeJS Version
Rhino Version
1902.2.2-build.268
Architectury Version
6.5.82
Forge/Fabric Version
43.2.11
Describe your issue
Custom ingredients, including Ingredient#custom and Ingredient#customNBT do not work because of this line:
It sets isServer to false, which is then checked when the ingredient is tested, and the ingredient returns false without actually invoking the custom test.
From my debugging it seems that the ingredient parsed from JSON is the only ingredient to ever be tested. The testing does happen on the server thread tho.
Im not sure what purpose this isServer set in the json constructor serves, does recipe json parsing really only happen on the client???
Crash report/logs
No response
This also causes issues with using custom predicates for item filtering in block entities, because that too uses Ingredient: