While using the latest version of this mod with kubeJS, when I try to modify some recipes I get an error that the chorium processing recipe is in some way invalid and it throws an error.
To Reproduce
Steps to reproduce the behavior:
- Create a modpack with at least Create Encased and KubeJS (and associated deps)
- Add script to server_scripts with a call to function
ServerEvents.recipes.
- When you start a server (or singleplayer), KubeJS attempts to interpret all modded recipes and fails on one of the chorium recipes.
- The server still launches, but it pops up an error to the player and logs it.
My guess
For the record I can find the failing recipe in the EMI interface, so neoforge is handling it, just KubeJS is failing to parse it. No other mod has this issue, so I think it is a result of the recipe json. My suspect line is this one:
|
"type": "fluid_stack", |
|
"amount": 500, |
|
"fluid": "minecraft:lava" |
I am a novice at modded minecraft, but I took a look at the syntax in the create mod github, and the chocolate recipe uses {"amount": 250, "id": "create:chocolate"} to specify 250mb of chocolate (fluid). I wonder if neoforge allows the fluid_stack syntax, but it's deprecated or old enough that KubeJS is not aware of or not willing to support this syntax. Perhaps {"amount": 500, "id": "minecraft:lava"} is suitable to fix it? Ignore me if you know I am wrong somewhere here.
Here is the error message I get. I only get it if I actually use the ServerEvents.recipe function from KubeJS, otherwise I think KubeJS doesn't attempt to parse the problem json.
[01:09:49] [ERROR] ! KubeRecipe.java#90: Failed to create custom recipe from json {"type":"create:filling","ingredients":[{"item":"createcasing:processing_chorium"},{"type":"fluid_stack","amount":500,"fluid":"minecraft:lava"}],"results":[{"id":"createcasing:processing_chorium"}]}: Failed to read required component 'ingredients: either<create:sized_fluid_ingredient, ingredient>[]' - java.lang.IllegalStateException: Failed to parse either. First: Unknown registry key in ResourceKey[minecraft:root / neoforge:fluid_ingredient_type]: minecraft:fluid_stack; Unknown registry key in ResourceKey[minecraft:root / neoforge:fluid_ingredient_type]: minecraft:fluid_stack; Second: Failed to parse either. First: Not a json array: {"type":"fluid_stack","amount":500,"fluid":"minecraft:lava"}; Second: Unknown registry key in ResourceKey[minecraft:root / neoforge:ingredient_serializer]: minecraft:fluid_stack
[01:09:49] [WARN] KubeRecipe.java#90: Failed to parse recipe 'createcasing:sequenced_assembly/chorium_ingot[create:sequenced_assembly]'! Falling back to vanilla: Failed to read required component 'sequence: nested_recipe[]' - java.lang.IllegalStateException: Failed to create custom recipe from json {"type":"create:filling","ingredients":[{"item":"createcasing:processing_chorium"},{"type":"fluid_stack","amount":500,"fluid":"minecraft:lava"}],"results":[{"id":"createcasing:processing_chorium"}]}
Desktop (please complete the following information):
- Windows
- Minecraft Version 1.21.1
- Forge Version 21.1.242
- Mod Version 1.9.0-ht2
- KubeJS 2101.3.1-build.18
While using the latest version of this mod with kubeJS, when I try to modify some recipes I get an error that the chorium processing recipe is in some way invalid and it throws an error.
To Reproduce
Steps to reproduce the behavior:
ServerEvents.recipes.My guess
For the record I can find the failing recipe in the EMI interface, so neoforge is handling it, just KubeJS is failing to parse it. No other mod has this issue, so I think it is a result of the recipe json. My suspect line is this one:
CreateCasing/src/main/resources/data/createcasing/recipe/sequenced_assembly/chorium_ingot.json
Lines 20 to 22 in 61bfd4a
I am a novice at modded minecraft, but I took a look at the syntax in the create mod github, and the chocolate recipe uses
{"amount": 250, "id": "create:chocolate"}to specify 250mb of chocolate (fluid). I wonder if neoforge allows the fluid_stack syntax, but it's deprecated or old enough that KubeJS is not aware of or not willing to support this syntax. Perhaps{"amount": 500, "id": "minecraft:lava"}is suitable to fix it? Ignore me if you know I am wrong somewhere here.Here is the error message I get. I only get it if I actually use the ServerEvents.recipe function from KubeJS, otherwise I think KubeJS doesn't attempt to parse the problem json.
[01:09:49] [ERROR] ! KubeRecipe.java#90: Failed to create custom recipe from json {"type":"create:filling","ingredients":[{"item":"createcasing:processing_chorium"},{"type":"fluid_stack","amount":500,"fluid":"minecraft:lava"}],"results":[{"id":"createcasing:processing_chorium"}]}: Failed to read required component 'ingredients: either<create:sized_fluid_ingredient, ingredient>[]' - java.lang.IllegalStateException: Failed to parse either. First: Unknown registry key in ResourceKey[minecraft:root / neoforge:fluid_ingredient_type]: minecraft:fluid_stack; Unknown registry key in ResourceKey[minecraft:root / neoforge:fluid_ingredient_type]: minecraft:fluid_stack; Second: Failed to parse either. First: Not a json array: {"type":"fluid_stack","amount":500,"fluid":"minecraft:lava"}; Second: Unknown registry key in ResourceKey[minecraft:root / neoforge:ingredient_serializer]: minecraft:fluid_stack[01:09:49] [WARN] KubeRecipe.java#90: Failed to parse recipe 'createcasing:sequenced_assembly/chorium_ingot[create:sequenced_assembly]'! Falling back to vanilla: Failed to read required component 'sequence: nested_recipe[]' - java.lang.IllegalStateException: Failed to create custom recipe from json {"type":"create:filling","ingredients":[{"item":"createcasing:processing_chorium"},{"type":"fluid_stack","amount":500,"fluid":"minecraft:lava"}],"results":[{"id":"createcasing:processing_chorium"}]}Desktop (please complete the following information):